RFC: V9 Failure State Machine & Diagnostic Artifacts #1
Devaretanmay
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
TokenCircuit is evolving from a simple loop counter to a deterministic execution governance engine. This RFC defines the new
EquivalenceKey, the 6-classFailureTaxonomy, and theDiagnosticArtifactthat will be attached to every intervention.The Equivalence Key (Debuggable by Design)
Per production feedback, we are moving away from opaque hashing. The
EquivalenceKeywill be a frozen dataclass that logs the raw fields used for grouping. If an intervention fires, the developer sees exactly why it was considered equivalent.The Failure Taxonomy & State Transition Table
Instead of a global
max_repeats, each failure class has a strict budget and a defined next-allowed action.The Diagnostic Artifact
When the detector fires, it produces an immutable artifact attached to the
TokenCircuitError. This is not just a log; it is the formal proof of the transition.Concrete Test Cases
To ensure this works in production, we are implementing the following invariant tests:
unknownrather thanfailed. (Crucial to prevent duplicate side effects).Open Questions
TokenCircuitConfig, or are they fixed constants in the core engine?side_effect_boundary, what is the most reliable heuristic to detect if a tool mutated state before failing, without relying on the LLM to tell us?Looking for feedback on the state machine shape and the test cases before we lock this in for V9.
All reactions