@sun-asterisk/sungen 3.2.24-beta.1 → 3.2.24-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +20 -3
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +4 -3
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +10 -4
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/harness/audit.d.ts +9 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +83 -5
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/flow-contract.d.ts +75 -0
- package/dist/harness/flow-contract.d.ts.map +1 -1
- package/dist/harness/flow-contract.js +122 -1
- package/dist/harness/flow-contract.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts +20 -0
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +35 -0
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts +4 -0
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +42 -0
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +13 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +36 -0
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +20 -3
- package/src/exporters/feature-parser.ts +10 -4
- package/src/harness/audit.ts +86 -10
- package/src/harness/flow-contract.ts +158 -1
- package/src/harness/spec-coverage.ts +38 -0
- package/src/harness/viewpoint-ledger.ts +42 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +13 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +36 -0
|
@@ -690,6 +690,42 @@ core, AF→behaviour, EF→validation/security) and traces them to the viewpoint
|
|
|
690
690
|
`FL-EF` priority rows. Declare `phases: [BF, AF, EF]` in the contract; the FIRST phase is the
|
|
691
691
|
Basic Flow and is the one that must reach `outcome`.
|
|
692
692
|
|
|
693
|
+
**Declare the flow INVENTORY, not just the phases.** `phases: [BF, AF, EF]` says which
|
|
694
|
+
vocabulary the suite uses; it cannot say how many flows the use case has — a phase counts as
|
|
695
|
+
covered the moment ONE scenario carries it, so a fifteen-flow use case with three scenarios
|
|
696
|
+
reported full phase coverage while a reviewer counting flows read it as a third done. List every
|
|
697
|
+
flow in the contract, and give each one a status:
|
|
698
|
+
|
|
699
|
+
```yaml
|
|
700
|
+
flows:
|
|
701
|
+
- id: BF
|
|
702
|
+
outcome: "The successGuarantee — verified, recorded, signed in"
|
|
703
|
+
status: covered
|
|
704
|
+
- id: AF02
|
|
705
|
+
branchFrom: "BF step 4, before submitting"
|
|
706
|
+
outcome: "Re-enters BF at step 4 with the buffer restored"
|
|
707
|
+
status: covered
|
|
708
|
+
- id: EF08
|
|
709
|
+
branchFrom: "BF step 1, the control tapped twice"
|
|
710
|
+
outcome: "One request, one record"
|
|
711
|
+
status: pending-clarification # the spec is silent — ASK, never assume a guard
|
|
712
|
+
reason: "The guard lives in ST_AUTH_001's spec, which this project does not hold."
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Four statuses, and **silence is not one of them**: `covered` · `deferred` · `pending-clarification`
|
|
716
|
+
(the behaviour is not agreed yet, so no scenario can be right) · `out-of-scope` (another suite owns
|
|
717
|
+
it). Anything but `covered` needs a `reason:` — a deferral nobody can audit is the same as a
|
|
718
|
+
missing flow. `sungen audit` then measures `flowCoverage` per DECLARED FLOW and reports
|
|
719
|
+
`FLOW-UNCOVERED` (declared, nobody wrote it), `FLOW-UNDECLARED` (a scenario claiming a flow id the
|
|
720
|
+
inventory never declares), `FLOW-STATUS-UNREASONED` and `FLOW-INVENTORY-MISSING`.
|
|
721
|
+
|
|
722
|
+
**One flow, one id — a viewpoint is not a flow.** Several scenarios may prove one flow: give them
|
|
723
|
+
the same flow id and different sequence numbers (`VP-VAL-EF01-001`, `VP-VAL-EF01-002`), never a
|
|
724
|
+
fresh flow id per assertion. Two shapes the audit reports as `FLOW-PHASE-MISFILED`: an `EF` that
|
|
725
|
+
reaches the outcome with nothing failing (that is a success-path postcondition, so it belongs to
|
|
726
|
+
the BF), and an `AF` with no branch point (it walks the basic path asserting extra content — also
|
|
727
|
+
the BF's). Both inflate the flow count while adding no branch coverage.
|
|
728
|
+
|
|
693
729
|
**Declare once, then declare only the differences.** Actor · Trigger · Goal · Precondition ·
|
|
694
730
|
`successGuarantee` · `minimalGuarantee` are use-case-level: they live in `flow-contract.yaml`
|
|
695
731
|
and are never repeated per flow. Each flow in `test-viewpoint.md` then states only three things:
|