Repository navigation
lang04: carry the crate graph as JSON, not as a clipped log line - #15
Merged
Merged
Conversation
`Result.brief()` clips long output to 4000 characters, which is the right
shape for a log a person reads and the wrong shape for a document a later
module parses. `cargo metadata` for this workspace is around 5 KB, so the
copy that crossed the process boundary was a head, an elision marker and a
tail; `json.loads` raised on it, the auditor's `metadata()` swallowed the
error and returned `{}`, and the three gates that read the crate graph fail
closed. A submission whose `cargo metadata` had succeeded was told that
`workspace-members` and `crate-versions` had failed.
The document now travels as `BuildOutcome.metadata_json`, beside the clipped
result rather than inside it. `brief()` is unchanged: it is still the log.
`metadata_problem()` gives the three gates a detail that says which of the
two things happened, because a capture this verifier mangled is a defect
here and not a finding about the submission -- the old wording, "did not run
or did not parse", could not tell anyone which.
hongdy22
force-pushed
the
fix/lang04-metadata-transport
branch
from
September 14, 2026 06:19
06e8560 to
f62a1b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14.
Result.brief()clips output to 4000 characters because it writes a log a person reads.cargo metadatafor this workspace is larger than that, so the copy that crossed the process boundary was a head, an elision marker and a tail.json.loadsraised,IntegrityAuditor.metadata()swallowed it and returned{}, and the three gates that read the crate graph fail closed — so a command that had succeeded was reported asworkspace-membersandcrate-versionsfailing.What changed
BuildOutcome.metadata_json, beside the clipped result rather than inside it.brief()is unchanged: it is still the log.metadata_problem()gives the three gates a detail that distinguishes a command that failed from a capture this verifier mangled. The old wording — "did not run or did not parse" — could not tell anyone which, and the second case is our defect, not a finding about a submission.Regression —
infra/tests/test_lang04_metadata_transport.py, 7 checks, runs from the repository root with no cargo, no container and no submission:Fails on
main(5 of 7).