Skip to content

feat(rivetkit-agent-os): phase 2 — stat action arm + structured-payload wrapper tests for cross-encoding parity#5193

Open
abcxff wants to merge 1 commit into
stack/feat-rivetkit-phase-1c-agentos-native-ladder-engine-driver-branch-driver-suite-e2e-green-nxzrussyfrom
stack/feat-rivetkit-agent-os-phase-2-stat-action-arm-structured-payload-wrapper-tests-for-cross-encoding-parity-slkvonmt
Open

feat(rivetkit-agent-os): phase 2 — stat action arm + structured-payload wrapper tests for cross-encoding parity#5193
abcxff wants to merge 1 commit into
stack/feat-rivetkit-phase-1c-agentos-native-ladder-engine-driver-branch-driver-suite-e2e-green-nxzrussyfrom
stack/feat-rivetkit-agent-os-phase-2-stat-action-arm-structured-payload-wrapper-tests-for-cross-encoding-parity-slkvonmt

Conversation

@abcxff

@abcxff abcxff commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@abcxff

abcxff commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Stack for rivet-dev/rivet

Check out this stack: forklift get https://github.com/rivet-dev/rivet/pull/5193
Pull/update this stack: forklift sync
Publish local edits: forklift submit
Merge when ready: forklift merge

@claude

claude Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Code Review### OverviewThis PR adds the stat filesystem action to the agent-os action dispatcher and introduces cross-encoding parity tests for structured (non-byte) payloads modeled after VirtualStat. The action implementation is clean and the test coverage strategy is sound.### IssuesWeak ino u64 overflow test. Both the Rust roundtrip and TS parity tests note that ino must not silently truncate to f53, yet use 9_876_543_210 which is safely representable in f64 (2^53 is roughly 9 quadrillion, so this value is about 6 orders of magnitude below the danger zone). The test passes for the wrong reason: the encoder could silently downcast to f64 and these assertions would still be green. Use a value above 2^53 to actually exercise the invariant, e.g. 9_007_199_254_740_993 (2^53 + 1) or 18_000_000_000_000_000.Struct duplication between test files. VirtualStatFixture (in encoding_fixtures.rs) and the inline VirtualStat (in encoding_roundtrip.rs) are nearly identical 15-field structs. Defining them once in a shared test helper, or importing agent_os_client::VirtualStat directly if it derives Serialize, would eliminate the drift risk. As-is, a field added to the real VirtualStat requires three parallel updates.virtual_stat.json missing trailing newline. The fixture file is committed without a terminal newline. Minor but consistent repo convention.Phase 2 comments will rot. Per repo convention, delta-context comments like Phase 2 gate are ephemeral - future readers will not know what Phase 2 was. Strip the phase framing; the behavior is self-evident from the assertion names.### Nits- Em dash in filesystem.rs doc comment. CLAUDE.md says not to use em dashes; separate with a period instead. The existing readFile comment has the same issue but should not be propagated.- is_symbolic_link is false in the fixture test and true in the roundtrip test. Independent tests so not a correctness issue, but aligning avoids confusion when cross-referencing.- The TS test comment says Rust encode to TS decode path losslessly but the fixture is loaded as pre-decoded JSON, so the CBOR leg is covered by the Rust fixture generator, not the TS test. Worth clarifying inline.### SummaryThe action wiring (stat arm in dispatch, filesystem::stat helper) is correct and follows existing patterns. Main ask before merge: fix the ino test value so the u64-precision assertion actually exercises the invariant it claims to cover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant