feat(assistant): add tested condition waits and simplify Matter settlement #6193
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 632 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.386
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6193"
general
weight: 0.35
chinawch007
Summary
Matter tasks can now wait for an Agent-authored, tested read-only condition, with an absolute deadline as fallback. The Host evaluates conditions without model calls and resumes the same task session when the condition matches, repeated source checks fail, or the deadline expires. Time-only waits remain supported; no Goal is created.
Settlement is also shorter:
MatterSettleaccepts a summary and optional inline note instead of requiring a draft file and model-supplied revision. Independent review for wait/complete, activation and input-revision checks, durable history, and idempotent submissions remain. The Host binds settlement to the exact task context delivered before the calling tool event. Delegated workers retain their own lifecycle and business tools but no longer see the Bot's delegation/management tools.Builds on the merged cache fix #6177 and includes main through
85e942724.Same-turn handoff successors validate inherited Inbox context through Runtime's authenticated continuation lineage. The reader verifies seals, claims and successor openings; it does not borrow unrelated Session history. Tool-call matching also requires the current physical run, and input arriving after the call cannot authorize that submission.
Verification
Local verification after updating main and fixing inherited-context validation:
TMPDIR=/private/tmp.git diff --checkpassed.Real-model replay before incorporating the latest main update used GPT 6.1 Sol medium, actual Runtime Host/Bot/Matter tools and independent model review. Business records were controlled through an isolated HTTP/SQLite source, not mocked model or tool responses. Four concurrent tasks covered an amended acceptance condition, source HTTP 503 and recovery, cancellation followed by a late update, deadline fallback, Host restart and duplicate terminal updates. All 25 outcome checks passed; the test environment was stopped afterward.
| Outcome | Previous run | Simplified run |
| --- | ---: | ---: |
| A: full acceptance to visible notification | 89.8 s | 51.0 s |
| B: confirmed pickup to visible notification | 75.6 s | 40.2 s |
| D: unsigned deadline to visible notification | 49.3 s | 36.1 s |
| Final activation model calls, A / B / D | 10 / 8 / 5 | 4 / 4 / 4 |
The final activations used
MatterRead → MemoryOriginal → MatterSettle, without draft writes or separate three-file reads. Review calls remained 10. No settlement self-invalidation loop or worker misuse of coordinator tools occurred. This is a single scenario comparison with manually timed source changes, not a latency benchmark.Known observations: the Bot twice tried to combine exclusive delegation calls; checker construction had three missing-object-field errors; one retry time expired before submission. These recovered without intervention. Two additional tool errors came from the injected 503. The deliberate Host restart aborted one Bot model call; subsequent processing and final notifications recovered. Multi-day operation across repeated context compaction has not been live-tested.
AI use
Tool(s) and scope: OpenAI Codex assisted with implementation, regression tests, the isolated live replay, and this description. Commits include
Generated-by: Codextrailers.Checklist
Does this PR entail a change in behavior?