shared-code-reuse.md
35 lines · review/sections/shared-code-reuse.md at 3f79d81
Most marks come from matching words in the file, so treat them as pointers.
1<!-- AUTO-GENERATED from shared-code-reuse.md.tmpl — do not edit directly -->
2<!-- Regenerate: bun run gen:skill-docs -->
3**Reuse a skipped shared-code advisory only with complete structural evidence:**
51. **Read the evidence.** Read all supporting callers and the helper target
6 read-only: `git update-index`, even `--really-refresh`, clears the index flags
7 the checker reads. Establish first-party authored provenance and whether this
8 extraction is worthwhile; the checker cannot. Retain `evidence_paths`/`helper_target`.
92. **Run the checker.** From the repository root, pass the current finding as
10 literal JSON on stdin. Replace REVIEW_START with this pass's token
11 and the example paths/symbol with actual evidence. Keep the quoted delimiter.
13```bash
14"$HOME/.claude/skills/gstack/bin/gstack-review-log" --check-shared-libs REVIEW_START <<'GSTACK_SHARED_LIBS_REUSE_JSON'
15{"advisory":true,"severity":"INFORMATIONAL","evidence_paths":["src/caller-a.ts","src/caller-b.ts"],"helper_target":{"path":"src/shared.ts","symbol":"sharedHelper"}}
16GSTACK_SHARED_LIBS_REUSE_JSON
17```
193. **Act on its result.** Only `reusable: true` permits suppression.
20 False, command failure or unreadable output requires fresh source review and a
21 new decision, never suppression. Do not supply your own snapshot, prior record or coverage.
224. **Persist through the logger.** The logger recomputes coverage; never supply
23 proof. Real defects retain normal Fix-First handling.
25**What a reusable result proves (never reconstruct these checks):**
26- Identity: `sharedLibsFingerprint` plus the repo, raw branch and current snapshot.
27 The checker reads REVIEW_START without consuming/replacing it. Sanitized branch names are not identity.
28- Prior decision: completed/converged review, verified binding, explicit Skip and
29 logger-versioned `snapshot_covered_paths`; unversioned coverage needs a fresh decision.
30- Source: `canReuseSharedLibsAdvisory` requires every supporting path's raw file
31 byte-for-byte with its blob. Exclude assume-unchanged, skip-worktree and sparse index
32 entries; symlinks/ancestors, submodules, ignored/outside or unreadable files;
33 active/unknown Git filters, encodings and line conversion.
34- Safe inspection: disables fsmonitor and optional locks; never uses external diff/textconv.
35 Unknown evidence fails closed.
<!-- AUTO-GENERATED from shared-code-reuse.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs --> Reuse a skipped shared-code advisory only with complete structural evidence:
- Read the evidence. Read all supporting callers and the helper target read-only:
git update-index, even--really-refresh, clears the index flags the checker reads. Establish first-party authored provenance and whether this extraction is worthwhile; the checker cannot. Retainevidence_paths/helper_target. - Run the checker. From the repository root, pass the current finding as literal JSON on stdin. Replace REVIEW_START with this pass's token and the example paths/symbol with actual evidence. Keep the quoted delimiter.
"$HOME/.claude/skills/gstack/bin/gstack-review-log" --check-shared-libs REVIEW_START <<'GSTACK_SHARED_LIBS_REUSE_JSON'
{"advisory":true,"severity":"INFORMATIONAL","evidence_paths":["src/caller-a.ts","src/caller-b.ts"],"helper_target":{"path":"src/shared.ts","symbol":"sharedHelper"}}
GSTACK_SHARED_LIBS_REUSE_JSON- Act on its result. Only
reusable: truepermits suppression. False, command failure or unreadable output requires fresh source review and a new decision, never suppression. Do not supply your own snapshot, prior record or coverage. - Persist through the logger. The logger recomputes coverage; never supply proof. Real defects retain normal Fix-First handling.
What a reusable result proves (never reconstruct these checks):
- Identity:
sharedLibsFingerprintplus the repo, raw branch and current snapshot. The checker reads REVIEW_START without consuming/replacing it. Sanitized branch names are not identity. - Prior decision: completed/converged review, verified binding, explicit Skip and logger-versioned
snapshot_covered_paths; unversioned coverage needs a fresh decision. - Source:
canReuseSharedLibsAdvisoryrequires every supporting path's raw file byte-for-byte with its blob. Exclude assume-unchanged, skip-worktree and sparse index entries; symlinks/ancestors, submodules, ignored/outside or unreadable files; active/unknown Git filters, encodings and line conversion. - Safe inspection: disables fsmonitor and optional locks; never uses external diff/textconv. Unknown evidence fails closed.
Runs code bin/gstack-review-log :14