fix(domain): box project route detail so master clippy passes - #2315
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d196c1886c
ℹ️ 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".
| #[test] | ||
| fn error_stays_small_enough_to_return_by_value() { | ||
| assert!( | ||
| std::mem::size_of::<TraceDecayError>() <= 64, |
There was a problem hiding this comment.
Remove the arbitrary 64-byte error-size gate
This test enforces a substantially stricter constraint than the result_large_err lint it is meant to protect: a legitimate future variant that makes TraceDecayError 72–120 bytes would still satisfy Clippy but would fail the unit suite and force unnecessary boxing. Rely on the workspace Clippy check, or at least derive the assertion from the lint's actual threshold instead of freezing the enum at its incidental current size; repository guidance also explicitly rejects hard-coded gate counts as acceptance evidence.
AGENTS.md reference: AGENTS.md:L172-L176
Useful? React with 👍 / 👎.
Fixes #2308
Restores CI's clippy on master. Master had three kinds of breakage.
1.
clippy::result_large_err(root cause of the report).TraceDecayError::ProjectRoutestoredOption<ApplicationProblemDetailV1>inline since the typed problem detail work (#2283/#2289), so everyResult<_, TraceDecayError>carried a 160-byte error. The detail is nowOption<Box<ApplicationProblemDetailV1>>.project_route_with_detailis still the only constructor that attaches a detail, andproject_route_typed_detail()still returnsOption<&ApplicationProblemDetailV1>, so no caller changed. All 13 directProjectRoute { .. }sites either buildtyped_detail: Noneor match with.., so none needed edits.TraceDecayErroris not serialized, so the wire shape is unchanged:contracts:checksays "contracts up to date" and there is no SDK diff.size_of::<TraceDecayError>(): 160 bytes before, 64 after.errors::tests::error_stays_small_enough_to_return_by_valueasserts<= 64. It fails on origin/master ("TraceDecayError grew to 160 bytes; box the new payload") and passes with the fix.2.
too_many_argumentsandop_refintracedecay-query(introduced by d054014, merged through #2293).restore_content_addressed_with_progresstook 8 arguments. All four callers passed the sameCODE_LEXICAL_ARTIFACT_QUERY_CACHE_BUDGET_BYTES_V1, so the parameter is gone and the restore uses the query budget directly.§ions != …is nowsections != ….3. Red tests on master, found while proving the fix.
content_addressed_open_refuses_a_truncated_artifact_file(from feat(runtime): bound durable restore and memory ownership #2293): the full-verify path refuses a truncated file with "artifact file does not match the durable head size", but the test still expected the old "the durable head names" wording. The assertion now pins the exact new message.adoption_observation::census_counts_each_composed_family_and_omits_uncomposed_families(from refactor(mcp): run affected tests and the dashboard through the owner #2310):primitive.dashboardandprimitive.run-affected-testsbecame composed but were not classified. Both are now added toCLASSIFIED_CAPABILITIES.Local proof (on origin/master b80c426 merged in)
cargo clippy --workspace --all-targets --locked -- -D warnings:Finished, exit 0.cargo clippy --workspace --all-targets --locked --features tracedecay/test-transport,tracedecay-cli/test-transport -- -D warnings:Finished, exit 0.cargo check --workspace --all-targets --locked --target x86_64-pc-windows-gnu --features tracedecay/test-transport,tracedecay/test-helpers,tracedecay-cli/test-transport: exit 0.cargo test --libresults:cargo test -p tracedecay-cli --bin tracedecay: 332 passed, after building--example tracedecay-host-cli-fixture.cargo fmt --all -- --check: clean.pnpm run contracts:check: "contracts up to date".