spec-kitty / spec-kitty/spec-kitty
charter path-literal gate: clause-(b) scanner is blind to presence gates on parameter-typed charter_path
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 165
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 336
Description
**Source:** adversarial review during the #3317 landing (fold 1 — charter path-literal allow-list re-pin).
**Observation (non-blocking, pre-existing limitation).** The charter path-literal authority gate (`tests/architectural/test_charter_path_literal_authority.py`) detects a clause-(b) charter.md presence gate (`if [not] charter_path.exists():`) only when the receiver `charter_path` traces to a ` / CHARTER_MD` literal/constant join *within the same function*. When `charter_path` arrives as a **function parameter**, the scanner cannot resolve it and the site is invisible to the gate.
This surfaced legitimately in #3317: the FR-005 graceful-degrade read was extracted from `context.py::build_charter_context` into `context_result_builders.py:163`, where `charter_path` is a parameter — so the keyed literal site genuinely left the census (a correct DRAIN, and that site is a benign readability read, not a C-001 governance-authority gate).
**Why it's worth a note.** The extract-and-pass-as-parameter pattern is now a general way a *future* presence gate could evade clause (b) without the gate noticing. No current violation — the one relocated site is benign — but if the team wants the gate to be robust against this, it would need to follow `charter_path` provenance across call boundaries (inter-procedural), not just intra-function.
**Suggested action:** triage/decide whether inter-procedural provenance is worth the complexity, or accept the limitation and rely on review for parameter-passed presence reads. Parent under the charter-doctrine / architectural-gate epic as appropriate.
Contributor guide
Research direction
Start with tests/architectural/test_charter_path_literal_authority.py, then review the charter_path extraction from context.py::build_charter_context into context_result_builders.py:163. Determine whether the gate should follow parameter provenance across call boundaries or retain its current intra-function scope. Done means a documented decision, with the gate's behavior and review expectations made explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100