mirror of
https://github.com/garrytan/gstack.git
synced 2026-08-29 09:20:39 +02:00
fix(test): adversarial findings — stable root key, symlink-alias dedupe, fixture-shape guard
Adversarial review (Claude subagent) verified the fixture's root-skill key was
the capture machine's checkout dirname: any non-gstack-named clone (every
Conductor worktree) failed the free suite, and the documented re-run-the-capture
recovery baked the local dirname into the committed fixture — silent corruption
through the tool's own protocol. The root skill is now pinned to ROOT_SKILL_KEY
('gstack', its frontmatter name). Symlink aliases are realpath-deduped (census
precedent): connect-chrome no longer gets its own ceiling, so Windows checkouts
that materialize the symlink as a plain file can't fail the stale-ceiling
set-equality test. New guards: fixture-shape validation (a string alwaysOnTotal
can no longer silently disable the ceiling), a mutation pin that the filter
shrinks the always-on ledger vs the raw bill, an alwaysOnTotal violation test
(the branch was load-bearing with only under-budget coverage), and an atomic
temp+rename fixture write. Fixture regenerated: 59 ceilings, alwaysOnTotal 6344.
Deferred with a TODO: anchoring transformFrontmatter's denylist strip to the
frontmatter block (latent, zero live collisions, pre-existing path).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d80d3c3ed7
commit
c11e44b93a
@@ -691,6 +691,32 @@ or asserts dashboard/report text, then decide skeleton-vs-section placement per
|
||||
**Depends on / blocked by:** Token-reduction program Phases 1-4 landing (carve
|
||||
machinery churn would conflict).
|
||||
|
||||
### P3: Anchor transformFrontmatter's denylist strip to the frontmatter block
|
||||
|
||||
**What:** `transformFrontmatter` (scripts/gen-skill-docs.ts:525-530, denylist branch)
|
||||
deletes the FIRST line matching `^<field>:` anywhere in the file, not just inside
|
||||
the frontmatter block, and would orphan continuation lines of a block-style YAML
|
||||
value. Slice the frontmatter, strip within it, reassemble.
|
||||
|
||||
**Why:** Latent mis-strip class: a skill body line beginning `interactive:` or
|
||||
`benefits-from:` (e.g. a skill documenting the frontmatter contract) would be
|
||||
silently deleted from the render. Zero live collisions today (verified across all
|
||||
tracked SKILL.md bodies during the v1.69.x token-reduction Phase 0 review), but
|
||||
each new stripFields entry widens the exposure.
|
||||
|
||||
**Pros:** Kills the whole latent class; makes stripFields safe to grow.
|
||||
**Cons:** Touches the generator hot path — needs a full regen + the per-host
|
||||
golden fixtures re-checked; deserves its own small PR, not a rider.
|
||||
|
||||
**Context:** Found by the Phase 0 adversarial review on branch
|
||||
`prompt-token-load-reduction` (finding ADV4). The gen-side parser reads only
|
||||
inline `[...]` array form (gen-skill-docs.ts:751), so block-form YAML for these
|
||||
keys fails silently twice — worth a validation error at the same time.
|
||||
|
||||
**Effort estimate:** S (human team) → S (CC+gstack)
|
||||
**Priority:** P3
|
||||
**Depends on / blocked by:** none.
|
||||
|
||||
### P3: Revisit plan-ceo-review doctrine carve after the preamble program lands
|
||||
|
||||
**What:** Re-evaluate carving plan-ceo-review's ~13KB of always-loaded doctrine
|
||||
|
||||
Reference in New Issue
Block a user