mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-17 10:25:33 +02:00
fix: red-team review fixes (9 findings, 2 critical)
Red team reviewed what four specialists missed — cross-cutting and self-contradiction class: CRITICAL: the release-body banner tripwire failed OPEN on the exact leak it guards (grep -c prints 0 AND exits 1 on no-match, so a fallback echo double-emitted "0" twice and the -gt comparison fell into the clean branch) — counts now default via parameter expansion, and a functional drift test executes the rendered tripwire block against a 0->1 banner delta to prove the ABORT branch fires. CRITICAL: evidence fingerprints were captured AFTER the child exited, so a working-tree edit made DURING a long suite was certified as tested content — wtree is now captured before spawn and re-checked after; mid-run drift omits the fingerprint (grades STALE) with a warning. Also: the review-grading rule dropped its dirty-gates (they nullified the keystone dirty-record->commit->CURRENT property that evidence checks already honor — wtree equality alone proves identical content); careful's HIGH force-push tier falls back to probing origin/main|master when the origin/HEAD symbolic ref is absent (Conductor worktrees — the tier was silently inert in the primary deploy environment); quoted tokens (rm -rf "/", push "main") no longer dodge the deny; freeze fails CLOSED when its own helper file is missing (bash makes a missing source target fatal non-interactively, so an existence pre-check guards it); spec dedupe distinguishes pipeline failure from zero matches instead of silently skipping dedupe on gh/jq breakage; land 3.5b sets the cross-session --expect-cmd mismatch expectation; hook analytics JSON fields are encoder-built per this wave's own rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
a171029e6b
commit
5d6804cb61
@@ -1300,10 +1300,10 @@ codex-plan-review):
|
||||
1. Find the most recent entry within the last 7 days.
|
||||
2. **Content-first rule (diff-scoped rows only: `review`, `adversarial-review`,
|
||||
`codex-review`, ship-stage entries).** If the entry has a `wtree` field AND it
|
||||
equals the `---WTREE---` section of the output AND the entry's `dirty` is false
|
||||
AND `---DIRTY---` is false → **CURRENT**, full stop. Identical working-tree
|
||||
content, regardless of commit count, rebase, or amend — skip steps 3-4 for
|
||||
this entry. Never apply the wtree rule to plan-tier rows (plan-eng-review,
|
||||
equals the `---WTREE---` section of the output → **CURRENT**, full stop.
|
||||
Identical working-tree content, regardless of commit count, rebase, amend, or
|
||||
whether it was committed yet (wtree equality alone proves identical content) —
|
||||
skip steps 3-4 for this entry. Never apply the wtree rule to plan-tier rows (plan-eng-review,
|
||||
plan-ceo-review, plan-design-review): those grade a plan file, not the repo
|
||||
tree — they keep the 7-day logic and the commit heuristic below.
|
||||
3. Extract its `commit` field.
|
||||
@@ -1377,8 +1377,10 @@ Check the evidence ledger first:
|
||||
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<the project test command>' --max-age 24
|
||||
```
|
||||
|
||||
(The `--expect-cmd` string must be the exact command a wrapped run would use —
|
||||
it binds FRESH to the real suite, not to any green run recorded under the label.)
|
||||
(The `--expect-cmd` string must be the exact command the recorded run used —
|
||||
including any `2>&1` suffix — so FRESH binds to the real suite, not to any
|
||||
green run recorded under the label. A `cmd_sha256 mismatch` STALE is the safe
|
||||
outcome when the strings differ across sessions: just run live, wrapped.)
|
||||
|
||||
If it prints FRESH (exit 0), a green run is on record for THIS exact
|
||||
working-tree content (fingerprint-bound, so a rebase or an identical-content
|
||||
|
||||
@@ -396,10 +396,10 @@ codex-plan-review):
|
||||
1. Find the most recent entry within the last 7 days.
|
||||
2. **Content-first rule (diff-scoped rows only: `review`, `adversarial-review`,
|
||||
`codex-review`, ship-stage entries).** If the entry has a `wtree` field AND it
|
||||
equals the `---WTREE---` section of the output AND the entry's `dirty` is false
|
||||
AND `---DIRTY---` is false → **CURRENT**, full stop. Identical working-tree
|
||||
content, regardless of commit count, rebase, or amend — skip steps 3-4 for
|
||||
this entry. Never apply the wtree rule to plan-tier rows (plan-eng-review,
|
||||
equals the `---WTREE---` section of the output → **CURRENT**, full stop.
|
||||
Identical working-tree content, regardless of commit count, rebase, amend, or
|
||||
whether it was committed yet (wtree equality alone proves identical content) —
|
||||
skip steps 3-4 for this entry. Never apply the wtree rule to plan-tier rows (plan-eng-review,
|
||||
plan-ceo-review, plan-design-review): those grade a plan file, not the repo
|
||||
tree — they keep the 7-day logic and the commit heuristic below.
|
||||
3. Extract its `commit` field.
|
||||
@@ -473,8 +473,10 @@ Check the evidence ledger first:
|
||||
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<the project test command>' --max-age 24
|
||||
```
|
||||
|
||||
(The `--expect-cmd` string must be the exact command a wrapped run would use —
|
||||
it binds FRESH to the real suite, not to any green run recorded under the label.)
|
||||
(The `--expect-cmd` string must be the exact command the recorded run used —
|
||||
including any `2>&1` suffix — so FRESH binds to the real suite, not to any
|
||||
green run recorded under the label. A `cmd_sha256 mismatch` STALE is the safe
|
||||
outcome when the strings differ across sessions: just run live, wrapped.)
|
||||
|
||||
If it prints FRESH (exit 0), a green run is on record for THIS exact
|
||||
working-tree content (fingerprint-bound, so a rebase or an identical-content
|
||||
|
||||
Reference in New Issue
Block a user