validate: a scenario with no WHEN/GIVEN or THEN step counts as a scenario and passes
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- testing
Direzione di ricerca
Read the existing validate checks for empty scenario bodies and the containsShallOrMust convention, along with extractRequirementBody and the delta and main spec readers. Add focused coverage for trigger and outcome keywords, including fenced examples, on both delta and main spec paths. Done means normal validation warns and strict validation fails for scenarios missing both halves, while valid scenarios and keywords inside fences are handled as described.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
validate checks that a requirement has at least one scenario, and (since #1857) that a scenario's body is not empty. Nothing checks what the body contains: a scenario whose steps assert nothing passes everywhere.
### Requirement: Credit Notes
The system SHALL issue a credit note when an invoice is voided.
#### Scenario: Invoice voided
- **AND** the ledger is balanced
This validates (--strict included), archives, and lands in the main spec — and it can never fail a test built from it: no step triggers it (no **WHEN**/**GIVEN**) and no step asserts an outcome (no **THEN**). Those are the two halves the canonical format in docs/concepts.md and the generated templates always include, and the two halves the empty-scenario hint already prescribes ("add its steps, e.g. - **WHEN** ... and - **THEN** ...").
Reproduction
In a project created with openspec init + openspec new change edit, with a valid proposal and tasks, the delta openspec/changes/edit/specs/billing/spec.md:
## ADDED Requirements
### Requirement: Credit Notes
The system SHALL issue a credit note when an invoice is voided.
#### Scenario: Invoice voided
- **AND** the ledger is balanced
openspec validate edit --strict --json # "valid": true
openspec archive edit --yes # succeeds
Control: adding - **WHEN** an invoice is voided / - **THEN** a credit note is issued is of course valid too — the point is that the first form is indistinguishable to every gate.
Expected
A scenario with neither a trigger step nor an outcome step is reported at authoring time. Proposal:
- WARNING in normal mode — the same posture as the missing
SHALL/MUSTkeyword: guidance, not a verdict change (so plainvalidateandarchivekeep agreeing). - Fails
--strict, which already fails on any warning. - Both paths: delta
ADDED/MODIFIEDblocks and main specs, so the delta and spec readers stay in parity. - Fence-aware: a
WHENinside a fenced example is documentation, not a step — the maskingextractRequirementBodyalready applies to requirement text. - Uppercase, word-bounded keyword matching, exactly the
containsShallOrMustconvention.
Positioning
- Not #1720 (pre-generation quality gate: EARS grammar, ambiguity, cross-requirement consistency — in design review). This is the minimal deterministic slice — does the scenario have its two halves at all — with no grammar and no judgment.
- Not the soft "specs define measurable scenarios" check in the
/opsx:refinework (#783 / #893), which runs across all artifacts after drafting. This is a form check at authoring time, next to the scenario-shape checksvalidatealready does. - The natural continuation of #1857: that issue made "a scenario must have a body" true on both paths; this one makes "the body must be a scenario" true.
We hit this maintaining a spec contour on top of OpenSpec: a note-shaped scenario passes every gate, and only a human reading the spec notices it asserts nothing.
- Lingua principale
- TypeScript
- Stelle
- 71.6k
- Fork
- 4.9k
- Merge medio
- 2g 6h
- PR unite (30g)
- 82
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Fission-AI/OpenSpec
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Fission-AI/OpenSpec#2099 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Fission-AI/OpenSpec#2098 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Fission-AI/OpenSpec#1966 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
feat(schemas): open each proposal with a short review focusForse già presa @GaoSSR l’ha presa 26 giorni fa. Apertadesign-review
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
Fission-AI/OpenSpec#1908 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
Fission-AI/OpenSpec#2088 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Fission-AI/OpenSpec
Issue simili
-
test: make the #3408 Claude OAuth token fixture obviously fake so secret scanners stop flagging itAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
code-yeongyu/senpi#3436 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
lingdojo/kana-dojo#32505 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
code-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/gh-aw-firewall#10040 ·
I maintainer di solito rispondono entro 1 giorno
-
review-followup
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
griffinwork40/agent-afk#3868 ·
I maintainer di solito rispondono entro 1 giorno
-
area: import-export bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
amatya-aditya/obsidian-rss-dashboard#1191 ·
I maintainer di solito rispondono entro 1 giorno