FE-747: Declarative output routing for branching transitions#154
Conversation
PR SummaryLow Risk Overview Orchestrator: Reviewed by Cursor Bugbot for commit f706b1e. Bugbot is set up for automated code reviews on this repo. Configure here. |
f9de408 to
ee16289
Compare
ee16289 to
eef2f05
Compare
eef2f05 to
578e7c9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 578e7c9. Configure here.
b5c8c77 to
9ea1a4d
Compare
578e7c9 to
921cb17
Compare
9ea1a4d to
78bf6ee
Compare
921cb17 to
2047ef2
Compare
78bf6ee to
98729e9
Compare
525fd4d to
89a128a
Compare
7cc596c to
b8a1514
Compare
89a128a to
00aae52
Compare
b8a1514 to
72abdb1
Compare
c9db96d to
c63d2e1
Compare
9ee7f6d to
7d2e69b
Compare
c63d2e1 to
1908d8f
Compare
7d2e69b to
1c4e36a
Compare
1908d8f to
46081c4
Compare
Per-slice test-agent/code-agent places were replaced by shared pool:* places in FE-743; pool places are already excluded by the pool: prefix check.
Co-authored-by: Cursor <cursoragent@cursor.com>
New TRACK F frontier between petri-epic-verification-merge (done) and petri-graph-compilation (horizon, blocked on FE-700). Moves conditional output routing from wireHandlers fire closures into typed Guard predicates declared on HandlerDescriptor so a topology-only consumer can enumerate reachable output places per transition without invoking actions, reports, or the test runner — structural prerequisite for any static analysis (simulation, reachability, deadlock detection) and FE-700-independent. Retires the "Declarative output arcs" sub-bullet under petri-graph-compilation since it's now its own frontier; keeps "Token state enrichment" there. Co-Authored-By: Claude <noreply@anthropic.com>
Move conditional output routing from wireHandlers fire closures into typed Guard predicates declared on HandlerDescriptor. ActionDescriptor gains a required guard:Guard (replacing routeField); RunTestsDescriptor adds passGuard; AssessSemanticDescriptor adds satisfiedGuard. wireHandlers consumes them via a pure evalGuard(guard, report) helper. Adds enumerateCandidateOutputs(transition) so static consumers can derive the reachable output-place set per transition from topology alone, without instantiating actions, reports, or the test runner. Halt paths (budget exhaustion, verify-epic failure) and token transforms stay in fire closures and remain follow-on slices. New invariant I125-K. Engine contract suite unchanged (84 orchestrator tests pass); npm run verify green. Co-Authored-By: Claude <noreply@anthropic.com>
Disambiguates the typed routing predicate from TransitionContract.guard, the pre-existing human-readable note string on the same record. Pure rename across net-blueprint.ts (type + interpreter), net-compiler.ts (consumer), and topology.test.ts. Descriptor field names (passGuard, satisfiedGuard, ActionDescriptor.guard) keep their domain identifiers. No behavior change; 84 orchestrator tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
The existing per-kind tests computed expected output sets from the same descriptor fields the enumerator consumes, so they'd pass silently if both the topology emitter and the enumerator dropped a branch in lockstep. Add three goldens that pin literal expected place names for slice-1:evaluate, slice-1:run-tests, and slice-1:assess-semantic against the simplePlan fixture. Lockstep drift now surfaces immediately. Retires memory/REFACTOR.md (FE-747 refactor pass complete). Co-Authored-By: Claude <noreply@anthropic.com>
Unknown guard kinds now throw instead of falling through as false, so deserialized or malformed routing data cannot silently misroute tokens. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
46081c4 to
f706b1e
Compare


Summary
RouteGuardpredicates onHandlerDescriptor(always,reportFieldTruthy).evalRouteGuardandenumerateCandidateOutputsso topology can be analyzed without instantiating handlers or running agents.Context
What changed
RouteGuardonHandlerDescriptorwith shared evaluation on the runtime fire path and the static analyzer.topology.test.ts: twelve tests covering guard evaluation and candidate output enumeration, pinned with literal-fixture goldens.Verification
npm run verifygreen.Out of scope
Traceability
petri-declarative-routinginmemory/PLAN.md; umbrella H-6476.