Repository navigation
docs(agent): design topic stale-post check for managers (RIG-1714) - #2136
rigel-mintaka wants to merge 2 commits into
Conversation
Optimistic per-topic check: agent posts carry the newest message seen and a capped seen set; the server refuses a post when an unseen message from another author landed after it. Rows DL-472..476, pending Matt on OQ1-6. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Compass engineering docs preview: https://compass-comms-rig-1714-topic.compass-eng-docs.pages.dev Deployed from Changed pages: |
NULL-safe seen-set predicate, head-page mark rule, refused-id dedup, seen-set eviction floor, session reset; split hold pre-check and confirm restamp into T3/T4 behind the cost gate; complete OQ plan deltas; forced deadlock test. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Review at head |
|
Moved to RigelBuild/docs#24 under Matt's directive that design records live in the docs repo, not code repos. Review continues there. |
Moved from RigelBuild/compass#2136 under the design-records-to-docs-repo directive. Co-authored-by: Matt Wilkinson <matt@rigel.build>
Summary
Design record for RIG-1714: stop Manager agents from double-answering in a topic. Instead of the per-topic write lock the issue proposed, the record designs an optimistic stale-post check. An agent post carries the newest message the agent has seen in the topic (
last_seen_message_id) and a capped set of messages seen out of order (seen_message_ids). The server refuses the post when another author posted a message the agent has not seen. The refusal returns those messages so the model can decide whether to post again. There is no lock state, so nothing can wedge, and human posts are never checked.Record:
docs/designs/agent/compass-topic-write-locks/design.mdDecisions (all pending Matt)
PostMessageRequest.last_seen_message_id = 10,seen_message_ids = 11; refuse when an unseen message from another author exists. No lock, TTL or waiter queue.FOR NO KEY UPDATElock on the topic row, so seq order matches commit order. AnswerAsk locks the topic before the message.PostMessageResponse.stale_post = 3, the same shape as #2120'scost_estimate. The idempotent retry is checked first. Tools never retry on their own.Open questions for Matt (RIG-5137)
OQ1 to OQ6 are load-bearing: feature shape, seen set, whether human authors count, refusal shape, order against the #2120 hold, and whether the public RPC honours the fields. Recommendation: A, A, A, B, A, A. The Plan builds the recommendations, and each OQ lists the Plan change for the other options. This PR must not merge until the OQs are ruled.
Cross-record numbering
PostMessageRequest8 and 9 andPostMessageResponse2 belong to docs(agent): design message fan-out cost estimate and confirm gate (RIG-1713) #2120.CommsCallRequestarms 13 and 14 belong to docs(agent): design the per-agent status board #2078.Review
turn_start, the AnswerAsk lock order, tracker persistence, the refusal render budget, and merging T1 and T2 so the check never ships without a caller.Checks
Spec-impact: none
Ledger-impact: adds DL-472 to DL-476 (docs/designs/decisions/agent/)
Refs RIG-1714
Co-authored-by: Matt Wilkinson matt@rigel.build