Skip to content

feat(storage): inspect native worker prerequisites without mutations - #5792

Merged
devantler merged 4 commits into
mainfrom
codex/longhorn-host-inspection-5791
Nov 3, 2026
Merged

devantler merged 4 commits into
mainfrom
codex/longhorn-host-inspection-5791

Conversation

@devantler

@devantler devantler commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The migration is blocked by an observed huge-page allocation shortfall and unverified temporary-worker disk layouts. We need native facts before choosing the next safe step.

What

Add separately confirmed, read-only observations of worker memory counters and temporary-worker storage layouts. The observations preserve all migration guards and authorize no host or storage changes.

Related: #5782

📦 New dependency: The existing COSI runtime is used directly; its version is unchanged.

Part of #5791

Part of #5791. Bind fixed memory counters to unchanged native hardware and boot identity while preserving all migration gates.
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

At b5d0f86, the affected race suite passed (430 cases, three packages); golangci-lint reported zero issues; actionlint, offline zizmor and the whitespace check passed. The actual CLI refused execution outside the protected first-attempt main workflow before credential loading. Native counter parsing, observation and the actual Bash authorization branch each had a failing test before implementation.

Self-review covered correctness, simplification and security. The command path is limited to the existing fixed read requests plus the two fixed memory paths. The observer brackets counters with native boot, hardware and complete API projection, re-reads allocation, checks its deadline and client closure, and emits only selected numbers and a commitment after success. Tests reject incomplete counters, duplicate fields, unexpected units, impossible values, changed allocation or identity, read errors and client-close failure; no raw provider text or identity is serialized.

The production refresh failed its native allocation guard before changing the affected worker. Actual host-counter acceptance remains pending protected merge and a new confirmed observation. This PR changes no reservation, Pod, node, disk or engine setting, and it does not resolve the full runtime acceptance in #5791.

# Conflicts:
#	.github/workflows/prepare-longhorn-v2-node.yaml
#	scripts/migrate-longhorn-v2/inventory_temporary_test.go
#	scripts/migrate-longhorn-v2/main.go
Part of #5782 and #5791. Keep the original root observation scope unchanged; require separately confirmed layout observations, clean bounded native streams and unchanged identities. No reset clearance is granted.
@devantler devantler changed the title feat(storage): inspect native huge-page allocation without host writes feat(storage): inspect native worker prerequisites without mutations Nov 3, 2026
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Final scope at 09501cb adds separately confirmed read-only native block layouts to the memory probe. This shares the existing hardware, boot, complete API and source bracket. The original root-only mode retains schema 1 and performs no block reads; the new temporary-only layout mode emits schema 2 with reset clearance false.

The actual COSI SDK adapter accepted joined EOF, returned a prefix on a failed stream and did not enforce these entry/message limits. Failing native-wire tests reproduced those cases. The new fixed-scope reader requires canonical EOF, enforces per-message, total-byte and entry bounds before decoding, checks exact single-node metadata, rejects other namespaces/types/options, and withholds every prefix on failure. Its public commitment covers reported counters/properties; private device metadata is compared only in memory.

464 affected race tests pass across three packages; lint, actionlint, offline zizmor and whitespace checks pass. The actual CLI refuses this operation outside the confirmed first-attempt main workflow before credentials. The COSI dependency's existing version is unchanged. Self-review covered correctness, security and simplification. Both new modes remain dormant until protected main dispatch; native memory/block-layout acceptance is still pending. No reset operation was added.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 0d5b20a and 09501cb.

Files ignored due to path filters: 1
  • go.sum is excluded by !**/*.sum
Files selected for processing: 17
  • .github/workflows/prepare-longhorn-v2-node.yaml
  • go.mod
  • internal/longhorninventory/block_layout.go
  • internal/longhorninventory/block_layout_test.go
  • internal/longhorninventory/block_wire.go
  • internal/longhorninventory/block_wire_test.go
  • internal/longhorninventory/native.go
  • internal/longhorninventory/storage_root.go
  • scripts/migrate-longhorn-v2/README.md
  • scripts/migrate-longhorn-v2/host_memory.go
  • scripts/migrate-longhorn-v2/host_memory_test.go
  • scripts/migrate-longhorn-v2/inventory.go
  • scripts/migrate-longhorn-v2/inventory_runtime.go
  • scripts/migrate-longhorn-v2/inventory_temporary_test.go
  • scripts/migrate-longhorn-v2/main.go
  • scripts/migrate-longhorn-v2/storage_root_inventory.go
  • scripts/migrate-longhorn-v2/storage_root_inventory_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

CodeRabbit declined request #issuecomment-6592702286 at this head. Its authenticated reply #issuecomment-6592704828 and current-head summary #issuecomment-6592706664 report exhausted included reviews, with the next review available in 54 minutes from 01:10:12 UTC. The no-gate guard returned ADMIT; no completed review or finding was published. This is not a review pass. Continuing to the next permitted provider without waiting for quota.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T01:13:42.946450Z 09501cb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 09501cbd5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Evaluated head 09501cb: all 64 current check contexts are settled and successful, intentionally skipped or neutral. The affected 464 race tests exercise complete API/file/block observations, native streaming bounds, source and hardware/boot continuity, close failures and counter parsing. Lint, actionlint, offline zizmor, formatting and whitespace checks pass. The actual command refuses both new operations outside the confirmed main workflow before credentials. Both modes are observation-only and grant no reset clearance; the existing root-only mode retains its original schema and behavior.

CodeRabbit declined this head on quota; the no-gate guard admitted that record. Codex then completed a clean exact-head review: summary #issuecomment-6592743645 and receipt #issuecomment-6592760999. Complete comment, review, inline and thread inventories have no unresolved findings or maintainer instructions. The published body passes the consumer contract. Fresh platform health passes, the source claim is current, and GitHub reports CLEAN. Readable required checks and workflows pass; the configured code-quality rule remains unreadable and is left to the protected merge API.

The remaining evaluation is the fixed-selection, protected-main production observation after actual merge. This PR provides that read-only path; no native memory/layout receipt, rebuild, data migration or V2 adoption is claimed before it runs.

@devantler
devantler marked this pull request as ready for review November 3, 2026 01:18
@devantler
devantler added this pull request to the merge queue Nov 3, 2026
@devantler
devantler removed this pull request from the merge queue due to a manual request Nov 3, 2026
@devantler
devantler added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit be7e0e9 Nov 3, 2026
64 checks passed
@devantler
devantler deleted the codex/longhorn-host-inspection-5791 branch November 3, 2026 02:30
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant