Repository navigation
feat(store): status board tables, patch merge and board reads (RIG-5170) - #2212
rigel-mintaka wants to merge 1 commit into
Conversation
|
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 |
Review result: head 4d8ea6fReview-lead fan-out (correctness, security, design, style).
Dismissed with reasons: viewer-visibility capping belongs to the T4 service boundary; stopword-only search; After R7, the pre-push No open findings. |
|
Compass engineering docs preview: https://compass-server-rig-5170-boar.compass-eng-docs.pages.dev Deployed from |
4d8ea6f to
5128700
Compare
|
Rebase note: rebased onto |
Adds agent_boards and agent_board_tasks to 0001_init.sql, with tenant RLS and updated_at triggers. ApplyBoardPatch merges a presence-aware patch in one transaction: it enforces the caps, defaults a new task to ACTIVE, clears focus when the focused task is removed, merges subagents by id (dropping the oldest settled one past the cap), and leaves freshness alone for automatic patches. Board reads, task search, viewer-clipped asks by author, open authored refs, and coordinate lookups for pull requests and issues serve the later board derivation. Ask gains a stored Ref. Ledger-impact: none Co-authored-by: Matt Wilkinson <matt@rigel.build>
5128700 to
4d7c165
Compare
|
Rebase note: rebased onto |
This PR is part of a stack containing 5 PRs:
mainSummary
Status board store layer (task T2 of the agent status record). It adds tables, patch merge, and board, search and ask reads. It has no RPC; ListAgentBoards and the relay arms are T4/T5.
0001_init.sql):agent_boardsandagent_board_tasks(tenant-scoped, RLS forced), plusmessages_topic_at_idx (tenant_id, topic_id, at_unix_ms), which bounds the answered-ask window.ApplyBoardPatch:FOR NO KEY UPDATEagent lock.ended_atis set, or the status is completed, failed or aborted.waiting.onthat is missing, numeric or unknown.AgentBoards: board and task rows come from one REPEATABLE READ, read-only snapshot.SearchAgentBoards: full-text title and primary-ref match, plus state, waiting and ref filters. It caps distinct agents in SQL (default 20, max 100) and returns each agent's matching task keys.AsksByAuthor: pending asks first, then asks answered inside the window. The answer time is the answer message's timestamp, and channels the viewer can't see are clipped.Ask.Refwas added to the stored ask block.Tests
pgtest (
-tags=pgtest, container):onmissing, numeric and unknown), settled-subagent eviction (includingaborted), automatic patch freshness.TestRLSCatalogEnabledAndForced, the cross-tenant RLS suite and allTestAnswerAsk*pass.Gates:
sqlc-drift,sqlc-vet(db-prepare skipped locally with no DSN),sql-migration-gate,inline-sql-gate, golangci-lint (with and without thepgtesttag), and themoon cipre-push gate.Refs RIG-5170
Ledger-impact: none