fix(review): publish state, not scratch, and a boolean that is one - #95
Merged
Conversation
Two reports from the webview, both correct. Every metadata value was a JSON string, because jq --arg produces one. So merge_base_resolved shipped as "false", which is truthy in a consumer, and the caveat banner keyed on it never fired from the day it was written. It is now a real boolean; the rest stay strings, which is what readers already parse, and the types are written down so the next field does not repeat it. Published bundles carried the engine's working area: a run log, two empty lock files, all inflated by nobody and paid for on every fetch. On a small repository the log alone was a fifth of the bundle, and it grows with the analysis. Logs and lock files are now stripped when a bundle is staged. Health configuration stays, because a run seeded from a bundle reads it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
CodeBoarding reviewStatus: 0 changed components See the full change in CodeBoarding. graph LR
n_Visual_Rendering_Engine["Visual Rendering Engine"]
n_Structural_Diff_Engine["Structural Diff Engine"]
n_Interaction_Orchestrator["Interaction Orchestrator"]
n_Visual_Rendering_Engine -- "Returns rendering metadata and diagram artifacts" --> n_Interaction_Orchestrator
n_Structural_Diff_Engine -- "Provides annotated diff model for visualization" --> n_Visual_Rendering_Engine
n_Interaction_Orchestrator -- "Triggers structural comparison via CLI" --> n_Structural_Diff_Engine
classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
|
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.
Two reports from the webview, both correct, both mine.
merge_base_resolvedwas the string"false"jq --argproduces JSON strings, so every metadata value shipped as one. A string"false"is truthy, so the caveat banner keyed on it never fired from the day it was written — the webview built a feature against a field that could not trigger it.It is now a real boolean via
--argjson. Everything else stays a string, which is what readers already parse, and the types are now stated inCOMMIT_STRATEGY.mdso the next field added does not repeat this.The webview has since made its check accept both spellings, so this is belt and braces on their side — but the contract should be honest regardless.
Bundles shipped the engine's scratch
A real published base bundle:
Stripping the log and the lock files makes the bundle 22% smaller on this repository, and the log grows with the analysis, so the share is at least that elsewhere. Every fetch pays for those bytes.
Health configuration is deliberately kept: a run seeded from a bundle reads it, so dropping it would silently ignore a repository's health settings.
On splitting the bundle
The remaining overhead for a reader is the pickle, which the action genuinely needs to seed a head. Splitting the base into a graph artifact and a state artifact would remove it, and I do not think it is worth it: it adds a fourth artifact kind, a fourth name and lifetime to keep in step, and stores the graph twice, in exchange for bytes a reader pays once per merge base and caches. Stripping the scratch is the cheap 80% of that win with none of the complexity.
Verification
94 tests.
test_scratch_files_are_not_publishedseeds a fixture containing a log and a lock file and asserts neither reaches the staged bundle, mutation-checked by removing the strip. The metadata test now assertsassertIs(..., True)rather than equality with a string.🤖 Generated with Claude Code