Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ Parse + model all behavioral bodies with unified fallback grammar:
- Lowering to execution IR lives in `internal/core/lower/` (`ToActionGraph`, `ToStateGraph`)

**Testing:**
- **Golden ASTs**: 80 fixtures - `internal/core/parser/testdata/parse/`
- **Golden ASTs**: 81 fixtures - `internal/core/parser/testdata/parse/`
- **Negative tests**: 127 subtests - `internal/core/parser/negative_test.go`
- **Unit tests**: 43 tests (action, state) - `action_executor_test.go`, `state_executor_test.go`
- **Conformance gate**: 211 cases (all passing: calc×56, action×50, state×41, requirement×12, instance×9, unit×7, constraint×7, satisfy×5, variation×5, redefinition×5, variant×3, feature×3, ballandchain×3, and one each of accept, attribute, connector, cubesat and multiplicity) - `conformance_test.go`
- **Golden traces**: 69 `.trace.golden` files (action×28, calc×25, state×12, constraint×4) - `trace_test.go`
- **Robustness**: 143 failure-mode subtests (deadlock, unbound params, missing features, dangling transitions, sourceless accept, step budget, pseudostate dead ends and cycles, history and defer misuse, send/accept misrouting, calc arity/recursion, `perform` reference failures) - `robustness_test.go`
- **Robustness**: 146 failure-mode subtests (deadlock, unbound params, missing features, dangling transitions, sourceless accept, step budget, pseudostate dead ends and cycles, history and defer misuse, send/accept misrouting, calc arity/recursion, `perform` reference failures) - `robustness_test.go`
- **Coverage**: All behavioral types fully functional. Action: 14/14 features ✅. State: 13/13 features ✅. Calc: 8/8 ✅. Constraint: 5/5 ✅. Requirement: 5/5 ✅. Evaluation: 7/7 ✅.

**Measured Compliance:** See [SPEC_COMPLIANCE.md](SPEC_COMPLIANCE.md) for semantic rule → implementation → test case mapping with status (✅ faithful / ⚠️ approximate / ❌ not yet implemented).
Expand Down Expand Up @@ -487,7 +487,7 @@ go test -v -run TestStdlibConformance ./internal/core/libs
#### 2. Golden AST Snapshots
- **Purpose:** Verify AST structure matches expected output
- **Location:** `internal/core/parser/golden_test.go`
- **Fixtures:** `testdata/parse/*.sysml` and `*.kerml` (80 representative files)
- **Fixtures:** `testdata/parse/*.sysml` and `*.kerml` (81 representative files)
- **Goldens:** `testdata/parse/*.golden` (AST dumps)
- **Acceptance:** Parse output matches golden file
- **Update flag:** `go test -run TestGolden -update` (regenerate goldens after intentional changes)
Expand Down Expand Up @@ -533,7 +533,7 @@ New behavioral features (actions, states, calc, constraints, requirements) requi
#### 1. Golden AST Fixtures
- **Purpose:** Lock in parse structure before execution changes
- **Location:** `internal/core/parser/testdata/parse/` (behavioral fixtures)
- **Coverage:** 80 fixtures in total, behavioral ones (action, calc, constraint, requirement, state) among them
- **Coverage:** 81 fixtures in total, behavioral ones (action, calc, constraint, requirement, state) among them
- **Acceptance:** `TestGolden` passes, AST dumps match expectations
- **Update flag:** `go test -run TestGolden -update`

Expand Down Expand Up @@ -583,7 +583,7 @@ go test -v -run TestExecutionConformance ./internal/core/runtime
#### 4. Runtime Robustness Tests
- **Purpose:** Verify malformed/pathological behaviors fail gracefully (typed errors, no panics/hangs)
- **Location:** `internal/core/runtime/robustness_test.go`
- **Test:** `TestRuntimeRobustness` with 143 failure-mode subtests
- **Test:** `TestRuntimeRobustness` with 146 failure-mode subtests
- **Acceptance:** All return typed errors, never panic, timeout guard (60s) prevents hangs

**Failure modes:**
Expand Down
4 changes: 2 additions & 2 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Full gate green: `gofmt -l .` empty, `go build ./...`, `go vet ./...`, `staticch
| Execution conformance cases | 211 |
| gRPC conformance cases | 8 |
| Golden execution traces | 69 |
| Runtime robustness subtests | 143 |
| Golden AST fixtures | 80 |
| Runtime robustness subtests | 146 |
| Golden AST fixtures | 81 |
| Negative parser subtests | 127 |

Statement coverage, measured today with `go test -cover ./...`:
Expand Down
6 changes: 3 additions & 3 deletions docs/SPEC_COMPLIANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ are tracked here):
| `value.go` | Runtime value representation (ValConst, ValString, ValInstance) | ~150 |
| `trace.go` | Deterministic execution and calc-evaluation trace recording, canonical value rendering | ~290 |
| `conformance_test.go` | Conformance gate (211 cases) | ~480 |
| `robustness_test.go` | Failure-mode tests (143 subtests) | ~830 |
| `robustness_test.go` | Failure-mode tests (146 subtests) | ~830 |
| `trace_test.go` | Golden trace test infrastructure | ~200 |
| `trace_calc_test.go` | Trace determinism and canonical rendering unit tests | ~180 |

Expand All @@ -912,8 +912,8 @@ See [`TESTING.md`](TESTING.md) for complete test contract details.
**Test Counts** (re-counted from the checked-in fixtures and from `-v` runs):
- Execution conformance cases: 211 (all passing)
- gRPC conformance cases: 8 (all passing)
- Robustness subtests: 143 (all passing)
- Golden AST fixtures: 80
- Robustness subtests: 146 (all passing)
- Golden AST fixtures: 81
- Golden execution traces: 69
- Negative parser subtests: 127

Expand Down
6 changes: 3 additions & 3 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ go test -v -run TestStdlibConformance ./internal/core/libs
**Purpose:** Verify AST structure matches expected output

- **Test:** `TestGolden` (internal/core/parser/)
- **Fixtures:** `testdata/parse/*.sysml` and `*.kerml` (80 representative files)
- **Fixtures:** `testdata/parse/*.sysml` and `*.kerml` (81 representative files)
- **Goldens:** `testdata/parse/*.golden` (AST dumps)
- **Acceptance:** Parse output matches golden file

Expand Down Expand Up @@ -93,7 +93,7 @@ New behavioral features (actions, states, calc, constraints, requirements) requi
**Purpose:** Lock in parse structure before execution changes

- **Location:** `internal/core/parser/testdata/parse/` (behavioral fixtures)
- **Coverage:** 80 fixtures in total, behavioral ones among them
- **Coverage:** 81 fixtures in total, behavioral ones among them
- **Acceptance:** `TestGolden` passes, AST dumps match expectations

**Behavioral fixtures:**
Expand Down Expand Up @@ -146,7 +146,7 @@ go test -run TestExecutionTrace -update-traces ./internal/core/runtime
**Purpose:** Verify malformed/pathological behaviors fail gracefully

- **Test:** `TestRuntimeRobustness` (internal/core/runtime/)
- **Coverage:** 143 failure-mode subtests
- **Coverage:** 146 failure-mode subtests
- **Acceptance:** Typed errors, never panic, 60s timeout guard

**Failure modes:**
Expand Down
Loading