feat(agentic-circuit): transact slot release in rules - #142
Conversation
Add rule-owned slot release across the Python frontend, ACIR lowering, QueueGraph, and gfsim transaction protocol. Curate public state examples and retain focused semantic sources as integration fixtures.
e46f346 to
e806481
Compare
Carry the Slot-valid predicate through Queue consumption, persistent state, output presence, and release. Add focused acceptance evidence for combined atomic effects, same-snapshot readers, stable diagnostics, and the provisional PYC boundary.
|
Dependency note: #144 is the issue #136 follow-up stacked directly on this PR's head commit Please merge #142 before #144. The temporary upstream |
zhoubot
left a comment
There was a problem hiding this comment.
Merge blocker: rule-owned Slot release sets SlotState::pendingRelease and QueueSlot::doXfer applies it, but QueueSlot::hasPendingCommit() reports only fired_ (simulator/gfsim/include/gfsim/queue_blocks.h:3373-3378,3439-3451). SimSystem wakes activation dependents only from objects reported committed (simulator/gfsim/system.cpp:898-949,973-981), so a rule release can change Slot state without scheduling Slot-dependent rules. Existing generated tests manually execute every dispatch row and miss this scheduler boundary. Please make the Slot the committed activation source for rule-owned release and add a SimSystem scheduler regression. Also move the root-symbol lookup repair currently in #144 into this PR or otherwise ensure #142 does not land with the unresolved persistent-struct regression reported by its own evidence.
zhoubot
left a comment
There was a problem hiding this comment.
Re-reviewed at 893bd9c. The Slot commit-source regression, root symbol lookup regressions, scheduler coverage, enum/struct MLIR coverage, and IR ledger are repaired. Focused native/MLIR validation and both required G0 checks pass.
Summary
pyc6 Decision / Contract Impact
Issue #138 Acceptance Criteria
Status meanings: ✅ implemented with focused evidence;⚠️ remaining framework limitation or intentionally deferred evidence; ↗ consumer-owned follow-up outside this repository.
validandvalue.test_rule_slot_release_lowers_as_a_guarded_transaction_effectcovers both source forms;test_flat_and_nested_slot_rules_generate_and_run_identicallycompiles and runs both through the native path.slot.release()lowers to guardedac.slot.propose_release; frontend and ACIR tests reject duplicate or non-rule owners.test_queue_state_output_and_slot_release_commit_togethercovers the combined Python → ACIR → QueueGraph → native path, andSlotReleaseCommitsInputTwoOutputsAndTableAsOneTransactioncovers one runtime commit group with an input, two outputs, Table write, and Slot release. The specialized optional-multi-output Python rule parser does not yet acceptslot.release(), so that authoring combination remains open.SlotReleaseCommitsInputTwoOutputsAndTableAsOneTransactionfills one output and proves the input, both outputs, Table, Slot valid/payload, and reservations remain unchanged; the complete group commits after capacity becomes available.SlotCapturesBackpressuresReleasesAndDoesNotRefillcovers next-edge visibility, retained payload, backpressure, and no same-tick refill.ReadOnlyAndReleasingSlotTransitionsObserveTheSameCommittedSnapshotandtest_read_only_and_releasing_rules_share_the_committed_snapshotassert both observations at runtime, including the generated native path.@ac.ruleinstead of providing a second rule-transaction implementation.PycBackendRejectsProvisionalSlotWithoutLoweringfreezes the QueueGraph PYC diagnostic (Slot PYC lowering is not implemented); this PR adds no partial Slot lowering.Because criterion 9 is intentionally deferred, criteria 11 and 12 are consumer-owned follow-ups, and the optional-multi-output authoring combination in criterion 3 remains open, this PR relates to #138 but does not auto-close it.
Validation
GfsimTests: 254/254 passedCodeGenTests: 171/171 passedACIROpsTests: 1/1 passeddocs/gates/logs/20260915-ac-slot-rule-transactions/summary.mddocs/gates/logs/20260915-state-example-curation/summary.mddesigns/davincioopolicy failures, and two missing historical Decision evidence references.Documentation
Risk / Compatibility
Related Issues