fix(review): stop attempting a cache save a comment run cannot make - #86
Merged
Merged
Conversation
GitHub hands a run triggered by issue_comment a read-only cache token. The save is refused with "cache write denied: token has no writable scopes", which the cache action reports as "Unable to reserve cache with key ..., another job may be creating this cache" followed by "Cache save failed". Nothing is wrong, but every /codeboarding run ended with two warnings that read like a broken action, and the real reason was buried. Confirmed by running the same job both ways in this repository: identical permissions and action version, a pull_request run saves, a comment run is denied. Reads are unaffected either way, and a comment run restores sync's shared base entry normally. So the saves are skipped for that event, and the documentation stops claiming /codeboarding publishes a shared entry. Two consequences are written down instead: a repository reviewed only through the command never builds a chain, and /codeboarding refresh improves the comment it posts rather than what later runs start from. 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.
Every
/codeboardingrun currently ends with two warnings that look like a failure:Nothing is broken. GitHub gives a run triggered by
issue_commenta read-only cache token, so the save can never succeed. The cache action's "another job may be creating this cache" wording hides the real reason, which is only in the line above it.Confirmed by experiment, not inference
Same repository, same job definition, same permissions (
contents: read,pull-requests: write,issues: write,id-token: write), same action release — only the trigger differs:pull_requestCache saved with key: cb-head-v1-…issue_commentCache restored from key: cb-base-v1-…d8853c4token has no writable scopespush(sync)Note the middle row: a comment run reads the entry sync wrote 20 minutes earlier. Sharing works; only the write side is closed. No workflow permission changes this —
contents: writemight, but the review job analyzes untrusted fork code on/codeboarding, so trading repo-write access for a cache optimisation is the wrong side of that bargain.What changes
The two review save steps are skipped for
issue_comment. A comment run behaves exactly as before minus the misleading warnings.The docs stop claiming
/codeboardingpublishes a shared entry, and state the two consequences that follow instead:/codeboardingnever builds a chain, so every command re-derives the head from the base;/codeboarding refreshcannot persist what it recomputes — it fixes the comment it posts, while the next run still restores the analysis it was asked to replace.A pushed commit is what builds the chain, which is why the companion PR adds
synchronizeto the recommended workflow.Verification
83 tests pass. The new
test_reviews_do_not_attempt_a_save_a_comment_run_cannot_makeparsesaction.ymland fails if either review save step loses the guard — mutation-checked by removing it.🤖 Generated with Claude Code