BOHICA-LABS / BOHICA-LABS/vsdd-factory

bug(stub-architect): BC-mandated test seams (fields/getters cited in AC text) silently omitted from stub surface — test-writer must invent or fail

Open
#354 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
Avg merge
6h 43m
Merged PRs (30d)
29

Description

**Pattern: stub-architect produces stubs missing test seams that the BC explicitly mandates**

In a Phase-3 dispatch this session, stub-architect emitted a compilable stub surface for a BC that listed two distinct postconditions (`pitch_scale` modulation, `_sfx_stutter_active` flag) — but neither seam was added to the stub. The test-writer that ran next noticed and flagged it in its report; the implementer was told out-of-band to add the seams during TDD. No gate caught the gap before dispatch.

### Pattern shape

When a BC enumerates ACs that need test access to a runtime value (a pitch field, a state flag, a derived setting), the stub-architect must add either:
- the production field on the target class (preferred), or
- a `get_*()` test-seam method (acceptable for derived/transient values).

If neither is added, the test-writer either:
- writes tests against a non-existent property (test won't compile or passes vacuously on `Node.get()` → null), or
- has to invent the seam during test-writing (which moves design decisions into the wrong agent).

### Why it survives gates

- Stub-architect's output is rated by compilability + lint, not by BC-AC-coverage cross-check.
- Story-writer's `traces_to_bc` line claims full BC coverage but isn't decomposed into per-AC seam-existence rows.
- Test-writer's "what seams does this BC require?" reasoning happens too late — after the stubs are committed.
- Adversary sees the GREEN state and can't easily back-derive "would this stub surface have made the test-writer's job possible?"

### Distinct from existing issues

- #282 covers stub-architect collision warnings (class_name vs autoload singleton name).
- #289 covers orphan-component pattern (component produced, never wired to consumer).
- #332 covers producer-only output (derived value exposed, never consumed).
- This issue is upstream of all three: the stub surface itself doesn't carry the seams the BC needs to be testable.

### Suggested intervention

Two complementary checks:
1. **Stub-architect**: parse the BC's AC table; emit a "seams produced" manifest in the commit message or alongside the stub commit; fail if any AC-mentioned identifier has no corresponding stub member.
2. **Pre-test-writer gate** (could be `dx-engineer` or a new lint): given (BC, stub commit), enumerate identifiers in BC text and report which are absent from the stub surface. Block dispatch if absent and not explicitly marked deferred.

### Provenance

Observed 2026-06-29 on a BC enumerating `pitch_scale` (AC-3, `lerp(1.0, PITCH_MIN, intensity)`) and `_sfx_stutter_active` (AC-4, `intensity >= stutter_threshold`). Stub commit contained neither. Test-writer flagged: "stubs missing pitch_scale + _sfx_stutter_active test seams (BC AC-3/AC-4); implementer must add these during TDD." Implementer added them, but that's a design decision the stub-architect owed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.