Reject and reconsider suggestions in a persistent review queue #99

Closed
opened 2026-11-05 07:52:37 +00:00 by svc-agent-writer · 3 comments

Parent

#96

What to build

Reject wrong enrichment, revisit it deliberately, and page outstanding work across sessions and clients.

Acceptance criteria

  • Rejection survives restart, Source refresh and Mail peer rebuild; repeated equivalent evidence does not reopen the claim.
  • A materially different normalized value remains reviewable; explicit reconsideration or compatible undo reopens the original claim.
  • Filter/page by Person and review state through text and the App; no duplicate queue entries after retries.
  • Tests cover accept/edit/reject together, new evidence, rebuild, missing evidence dates and removal by Forget.
  • Run the required repository checks and the focused public-MCP/worker tests for this behaviour; use the existing temporary-store and Source fixtures.
  • For every new mutation, enforce the approved write contract, expected revisions, attribution, idempotent retry and safe undo; extend applicable read projections/change feeds.
  • For every new person-associated value, extend the existing erasure path and tests; keep personal values out of logs/audit detail.

Blocked by

Filed under: operator word "ok" sha256:2689367b205c

## Parent https://git.groupthink.asia/dev/people-mind-mcp/issues/96 ## What to build Reject wrong enrichment, revisit it deliberately, and page outstanding work across sessions and clients. ## Acceptance criteria - [ ] Rejection survives restart, Source refresh and Mail peer rebuild; repeated equivalent evidence does not reopen the claim. - [ ] A materially different normalized value remains reviewable; explicit reconsideration or compatible undo reopens the original claim. - [ ] Filter/page by Person and review state through text and the App; no duplicate queue entries after retries. - [ ] Tests cover accept/edit/reject together, new evidence, rebuild, missing evidence dates and removal by Forget. - [ ] Run the required repository checks and the focused public-MCP/worker tests for this behaviour; use the existing temporary-store and Source fixtures. - [ ] For every new mutation, enforce the approved write contract, expected revisions, attribution, idempotent retry and safe undo; extend applicable read projections/change feeds. - [ ] For every new person-associated value, extend the existing erasure path and tests; keep personal values out of logs/audit detail. ## Blocked by - https://git.groupthink.asia/dev/people-mind-mcp/issues/98 Filed under: operator word "ok" sha256:2689367b205c
Collaborator

⏸ SVD architect gate: dev/people-mind-mcp#99 reject-and-reconsider-suggestions-in-a-persistent-review-que

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity substrate · dispatch effort high

Run: 20261106T002215Z-b3fdfb21

Held because: CLEAN but 6 open risk(s) (2 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. Reconsider scope: should review.reconsider apply only to 'rejected' Suggestions (the lean), so that accepted or edited ones reopen only through undo, which also retracts the asserted field per the ADR 0005 Am.1 inventory row? Or should it also reopen accepted or edited Suggestions while leaving their asserted field in place? [decision]
  2. Queue cursor semantics: should people_review_queue and people_card_queue page by keyset on the Suggestion id (the lean)? Keyset is stable across sessions and clients when items are decided between pages. The alternative is the repo-wide integer-offset cursor (rows.py docstring), which skips rows in that case but keeps next_cursor meaning an offset. [decision]
  3. Title equivalence: titles are only stripped, while phones and URLs are normalised (enrich.py). So 'Licensed Plumber' and 'licensed plumber' are distinct Suggestions, and rejecting one does not suppress the other. Is that acceptable for #99 (the lean)? Or must case/whitespace folding land here? Folding would change Suggestion identity and need a schema-13 merge of existing rows. [decision]
  4. Tool naming (ADR 0005 Am.1 ruling 1 leaves this to each slice): confirm people_review_queue (text read tool) and people_card_queue (app-only JSON). Also confirm extending people_review's action Literal with reject and reconsider, rather than adding a separate write tool. [decision]
  5. The App view JS is not executed by the suite. After merge, open people_card in an MCP Apps host and confirm four things: Reject moves a row to 'rejected'; Reconsider returns it to 'open'; Review queue with the 'rejected' filter lists it; More appends the next page without repeating a row. [verification]
  6. The draft dev/people-mind-mcp#100 notes spec shares 8 written files with this one and bumps the schema to 13. After whichever PR lands second is rebased, re-run make check. Confirm the tests/test_actions.py len(names) count and the tests/test_server.py read-tool set include both slices' additions. [verification]

Change: Mirror the review branch of graph._apply_action (graph.py:718-759). Keep its shared prefix: not-found, redirected conflict, revision conflict, withdrawn failure. Then branch: review.reject needs state 'open' and sets state='rejected', decided_by, revision+1, plus _change 'update'. review.reconsider needs state 'rejected' and sets state='open', decided_by NULL, revision+1; its undo record keeps the prior decided_by. Split the undo branch (graph.py:787-810). Reject undo requires state 'rejected' and decided_by=target, then reopens. Reconsider undo requires state 'open', then restores the rejection with the original decided_by. Otherwise it answers conflict reason=revision. Rename the tuple to ASSERTING_KINDS and widen REVIEW_KINDS to four kinds. Add both kinds to actions.KIND_BUCKET (notes) and UNDOABLE. Widen the people_review/people_card_review/_review action Literal (server.py:426-476); reject and reconsider take no value. In forget, add a json_extract($.suggestion_id) undo_records delete before DELETE_PERSON. Add views.review_queue and review_queue_text, using _suggestion_items' representative rule (decided first, then lowest id; support != '') across Persons, keyset paging on suggestion id, and filters by person and state. Expose them as a read tool people_review_queue (_READ_ONLY) and an app-only people_card_queue (mirror people_card_suggestions, server.py:252-270). card.html gets Reject and Reconsider buttons in rowItem plus a paged, deduped queue mode. Update README. No schema change: the store.py:41 CHECK already admits 'rejected'.

Files: src/people_mind_mcp/actions.py · src/people_mind_mcp/graph.py · src/people_mind_mcp/views.py · src/people_mind_mcp/server.py · src/people_mind_mcp/card.html · README.md · tests/test_review_queue.py · tests/test_card_app.py · tests/test_server.py · tests/test_actions.py

Decision: accept the 6 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md

### ⏸ SVD architect gate: dev/people-mind-mcp#99 reject-and-reconsider-suggestions-in-a-persistent-review-que **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `substrate` · dispatch effort `high` **Run:** `20261106T002215Z-b3fdfb21` **Held because:** CLEAN but 6 open risk(s) (2 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Reconsider scope: should review.reconsider apply only to 'rejected' Suggestions (the lean), so that accepted or edited ones reopen only through undo, which also retracts the asserted field per the ADR 0005 Am.1 inventory row? Or should it also reopen accepted or edited Suggestions while leaving their asserted field in place? [decision] 2. Queue cursor semantics: should people_review_queue and people_card_queue page by keyset on the Suggestion id (the lean)? Keyset is stable across sessions and clients when items are decided between pages. The alternative is the repo-wide integer-offset cursor (rows.py docstring), which skips rows in that case but keeps next_cursor meaning an offset. [decision] 3. Title equivalence: titles are only stripped, while phones and URLs are normalised (enrich.py). So 'Licensed Plumber' and 'licensed plumber' are distinct Suggestions, and rejecting one does not suppress the other. Is that acceptable for #99 (the lean)? Or must case/whitespace folding land here? Folding would change Suggestion identity and need a schema-13 merge of existing rows. [decision] 4. Tool naming (ADR 0005 Am.1 ruling 1 leaves this to each slice): confirm people_review_queue (text read tool) and people_card_queue (app-only JSON). Also confirm extending people_review's action Literal with reject and reconsider, rather than adding a separate write tool. [decision] 5. The App view JS is not executed by the suite. After merge, open people_card in an MCP Apps host and confirm four things: Reject moves a row to 'rejected'; Reconsider returns it to 'open'; Review queue with the 'rejected' filter lists it; More appends the next page without repeating a row. [verification] 6. The draft dev/people-mind-mcp#100 notes spec shares 8 written files with this one and bumps the schema to 13. After whichever PR lands second is rebased, re-run make check. Confirm the tests/test_actions.py len(names) count and the tests/test_server.py read-tool set include both slices' additions. [verification] **Change:** Mirror the review branch of graph._apply_action (graph.py:718-759). Keep its shared prefix: not-found, redirected conflict, revision conflict, withdrawn failure. Then branch: review.reject needs state 'open' and sets state='rejected', decided_by, revision+1, plus _change 'update'. review.reconsider needs state 'rejected' and sets state='open', decided_by NULL, revision+1; its undo record keeps the prior decided_by. Split the undo branch (graph.py:787-810). Reject undo requires state 'rejected' and decided_by=target, then reopens. Reconsider undo requires state 'open', then restores the rejection with the original decided_by. Otherwise it answers conflict reason=revision. Rename the tuple to ASSERTING_KINDS and widen REVIEW_KINDS to four kinds. Add both kinds to actions.KIND_BUCKET (notes) and UNDOABLE. Widen the people_review/people_card_review/_review action Literal (server.py:426-476); reject and reconsider take no value. In forget, add a json_extract($.suggestion_id) undo_records delete before DELETE_PERSON. Add views.review_queue and review_queue_text, using _suggestion_items' representative rule (decided first, then lowest id; support != '') across Persons, keyset paging on suggestion id, and filters by person and state. Expose them as a read tool people_review_queue (_READ_ONLY) and an app-only people_card_queue (mirror people_card_suggestions, server.py:252-270). card.html gets Reject and Reconsider buttons in rowItem plus a paged, deduped queue mode. Update README. No schema change: the store.py:41 CHECK already admits 'rejected'. **Files:** `src/people_mind_mcp/actions.py` · `src/people_mind_mcp/graph.py` · `src/people_mind_mcp/views.py` · `src/people_mind_mcp/server.py` · `src/people_mind_mcp/card.html` · `README.md` · `tests/test_review_queue.py` · `tests/test_card_app.py` · `tests/test_server.py` · `tests/test_actions.py` **Decision:** accept the 6 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#99 reject-and-reconsider-suggestions-in-a-persistent-review-que completed integration verify.

  • PR: #136
  • Branch: feat/svd-dev-people-mind-mcp-99-reject-and-reconsider-suggest-451120d3
  • Commit: d8d94d21a5
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/92/1
  • Checks: PR #136 head d8d94d2: ci/woodpecker/pr/validation green. Local make check: 545 passed, 5 skipped. Focused tests: 88 passed.
  • Warning: The spec's MCP Apps host interaction check is scheduled for after merge and was not run here.
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261106T003500Z-451120d3 --confirm-merge)
spec-verify-dispatch Half B for dev/people-mind-mcp#99 reject-and-reconsider-suggestions-in-a-persistent-review-que completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/136 - Branch: feat/svd-dev-people-mind-mcp-99-reject-and-reconsider-suggest-451120d3 - Commit: d8d94d21a5786414cc36921869a4edba7f508c44 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/92/1 - Checks: PR #136 head d8d94d2: ci/woodpecker/pr/validation green. Local make check: 545 passed, 5 skipped. Focused tests: 88 passed. - Warning: The spec's MCP Apps host interaction check is scheduled for after merge and was not run here. - Decision: review the PR and merge? (`codex-svd ship --run-id 20261106T003500Z-451120d3 --confirm-merge`)
svc-svd-writer 2026-11-06 00:47:00 +00:00
  • closed this issue
  • removed the
    svd:go
    label
Author
Member

This was generated by AI during triage.

SVD gate and ship record: #99 (architect gate 2026-11-06 11:34 AEDT, merge 11:47 AEDT)

Measured facts

  • Half-A run 20261106T002215Z-b3fdfb21: CLEAN, 0 blocking defects, class substrate, 10 primary files, anchored at main 2ba707e. SCHEMA_VERSION stays 12, because 'rejected' is already in the Suggestion CHECK (store.py:41).
  • Half-B run 20261106T003500Z-451120d3: PR #136 at d8d94d2. Integrate readyForMerge true, with its head equal to the dispatch commit and no rework. The PR touches only Primary Files. All spec-named tests are present; the tool-count test is renamed to …thirteen… as the spec states.
  • Dispatch baseline: make check 533 passed, 5 skipped. After the change: 545 passed, 5 skipped. Both failure sets are empty.
  • Merged as 297468f; svd:go stripped by ship.

Buckets

  • Already decided: accepted and edited Suggestions reopen through undo, which retracts the asserted field (ADR 0005 Amendment 1 inventory). The list footer shape is next_cursor, more, total (ADR 0001). Tool naming is left to each slice (ADR 0005 Amendment 1 ruling 1).
  • Verification: V1, an MCP Apps host check after merge. Reject moves a row to rejected; Reconsider returns it to open; the queue with the rejected filter lists it; More appends the next page without repeating a row.
  • Genuinely open: title folding. Rejecting "Licensed Plumber" does not suppress "licensed plumber", because titles are only stripped. Folding changes Suggestion identity and needs a schema-13 merge of existing rows, so it is out of this slice.

Ruling

  • R1: review.reconsider applies to rejected Suggestions only.
  • R2: the queue pages by keyset on the Suggestion id. The cursor stays a non-negative integer; the docstring states it is a Suggestion id. Offset paging skips rows when items are decided between pages.
  • R3: titles keep the current normalisation; the residue above is recorded.
  • R4: people_review_queue (text) and people_card_queue (App only); people_review widens action with reject and reconsider.
  • V2: #100 (HOLD) re-runs Half-A on main after this merge, so the overlap resolves there.
  • GO, then merge.

Drafted line

codex-svd ship --run-id 20261106T003500Z-451120d3 --confirm-merge (run, exit 0).

Delegation

"auto-gate" and the einfari queue (gate); "I auth this session T4 merge and svd:go write, through 14:00aedt" (merge and label).

Spec: 2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md, Agent Adjustments. Ledger: 2026-W45-arch.

> *This was generated by AI during triage.* **SVD gate and ship record: #99** (architect gate 2026-11-06 11:34 AEDT, merge 11:47 AEDT) **Measured facts** - Half-A run `20261106T002215Z-b3fdfb21`: CLEAN, 0 blocking defects, class `substrate`, 10 primary files, anchored at `main` `2ba707e`. `SCHEMA_VERSION` stays 12, because `'rejected'` is already in the Suggestion CHECK (`store.py:41`). - Half-B run `20261106T003500Z-451120d3`: PR #136 at `d8d94d2`. Integrate `readyForMerge` true, with its head equal to the dispatch commit and no rework. The PR touches only Primary Files. All spec-named tests are present; the tool-count test is renamed to `…thirteen…` as the spec states. - Dispatch baseline: `make check` 533 passed, 5 skipped. After the change: 545 passed, 5 skipped. Both failure sets are empty. - Merged as `297468f`; `svd:go` stripped by ship. **Buckets** - Already decided: accepted and edited Suggestions reopen through undo, which retracts the asserted field (ADR 0005 Amendment 1 inventory). The list footer shape is `next_cursor`, `more`, `total` (ADR 0001). Tool naming is left to each slice (ADR 0005 Amendment 1 ruling 1). - Verification: V1, an MCP Apps host check after merge. Reject moves a row to `rejected`; Reconsider returns it to `open`; the queue with the `rejected` filter lists it; More appends the next page without repeating a row. - Genuinely open: title folding. Rejecting "Licensed Plumber" does not suppress "licensed plumber", because titles are only stripped. Folding changes Suggestion identity and needs a schema-13 merge of existing rows, so it is out of this slice. **Ruling** - R1: `review.reconsider` applies to rejected Suggestions only. - R2: the queue pages by keyset on the Suggestion id. The cursor stays a non-negative integer; the docstring states it is a Suggestion id. Offset paging skips rows when items are decided between pages. - R3: titles keep the current normalisation; the residue above is recorded. - R4: `people_review_queue` (text) and `people_card_queue` (App only); `people_review` widens `action` with `reject` and `reconsider`. - V2: #100 (HOLD) re-runs Half-A on `main` after this merge, so the overlap resolves there. - GO, then merge. **Drafted line** `codex-svd ship --run-id 20261106T003500Z-451120d3 --confirm-merge` (run, exit 0). **Delegation** "auto-gate" and the einfari queue (gate); "I auth this session T4 merge and svd:go write, through 14:00aedt" (merge and label). Spec: `2026-11-06-reject-and-reconsider-suggestions-in-a-persistent-review-que.md`, Agent Adjustments. Ledger: `2026-W45-arch`.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
dev/people-mind-mcp#99
No description provided.