Skip to content

fix(review): publish state, not scratch, and a boolean that is one - #95

Merged
Svilen-Stefanov merged 1 commit into
mainfrom
fix/bundle-contents-and-types
Aug 19, 2026
Merged

fix(review): publish state, not scratch, and a boolean that is one#95
Svilen-Stefanov merged 1 commit into
mainfrom
fix/bundle-contents-and-types

Conversation

@Svilen-Stefanov

Copy link
Copy Markdown
Contributor

Two reports from the webview, both correct, both mine.

merge_base_resolved was the string "false"

jq --arg produces 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 in COMMIT_STRATEGY.md so 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:

32452  analysis.json          needed
30477  static_analysis.pkl    needed
11805  logs/20260819_214303.log    ← nobody inflates this
 2813  file_coverage.json
 2668  health/health_report.json
 1875  health/health_config.json   ← a seeded run reads this, kept
 1303  fingerprint.json
   68  static_analysis.sha
    0  static_analysis.lock        ← nobody inflates this
    0  analysis.json.lock          ← nobody inflates this

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_published seeds 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 asserts assertIs(..., True) rather than equality with a string.

🤖 Generated with Claude Code

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>
@codeboarding-review

codeboarding-review Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

CodeBoarding review

Status: 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;
Loading

download artifacts · run 32307386114

@Svilen-Stefanov
Svilen-Stefanov merged commit 09757de into main Aug 19, 2026
3 checks passed
@Svilen-Stefanov
Svilen-Stefanov deleted the fix/bundle-contents-and-types branch August 19, 2026 22:31
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