Document the quiet-gap keys in the README and test the JMAP gap hook #123

Closed
opened 2026-11-01 23:35:18 +00:00 by svc-agent-writer · 2 comments

This was generated by AI during triage.

Follow-up to #118 (PR #122). The quiet-gap change hit the 16-file dispatch ceiling, and two small items were left out by decision at the architect gate on 2026-11-02.

Change

  • README.md: add the two [sync] keys to the key table, with the same wording as config.example.toml lines 33 and 34: checkpoint_gap_seconds (seconds with no writes for Litestream; 0 disables, otherwise 2 to 60) and checkpoint_gap_every (backfill batches between quiet gaps, across all accounts).
  • tests/test_jmap.py: one test that drives the JMAP backfill hook in jmap.py with the gap enabled and asserts Store.quiet is called after checkpoint_gap_every batches, and one with the gap disabled asserting it is not. Mirror the IMAP case in tests/test_ingest.py added by PR #122.

Acceptance

  • The README key table lists both keys.
  • Both JMAP tests pass under python3 -m pytest tests/test_jmap.py.
  • make check passes.

Blocked by

None.

Filed under: operator word "Svd:go" sha256:6f587467a1c5

> *This was generated by AI during triage.* Follow-up to #118 (PR #122). The quiet-gap change hit the 16-file dispatch ceiling, and two small items were left out by decision at the architect gate on 2026-11-02. ## Change - `README.md`: add the two `[sync]` keys to the key table, with the same wording as `config.example.toml` lines 33 and 34: `checkpoint_gap_seconds` (seconds with no writes for Litestream; 0 disables, otherwise 2 to 60) and `checkpoint_gap_every` (backfill batches between quiet gaps, across all accounts). - `tests/test_jmap.py`: one test that drives the JMAP backfill hook in `jmap.py` with the gap enabled and asserts `Store.quiet` is called after `checkpoint_gap_every` batches, and one with the gap disabled asserting it is not. Mirror the IMAP case in `tests/test_ingest.py` added by PR #122. ## Acceptance - The README key table lists both keys. - Both JMAP tests pass under `python3 -m pytest tests/test_jmap.py`. - `make check` passes. ## Blocked by None. Filed under: operator word "Svd:go" sha256:6f587467a1c5
Collaborator

⏸ SVD architect gate: dev/mail-mind-mcp#123 document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap

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 additive · dispatch effort low

Run: 20261102T063839Z-c4d2393f

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

Open risks:

  1. The JMAP backfill hook (src/mail_mind_mcp/jmap.py:623-624) discards QuietGap.after_batch()'s return value. The IMAP hook (ingest.py:239-240) breaks the backfill when it returns True, which happens when stop is set during a gap. Should a follow-up issue make JMAP honour the stop the same way? It is out of scope for #123; the spec's tests deliberately assert neither behaviour. [decision]
  2. The suite could not be run in the Half-A sandbox (.venv unreadable). After dispatch, run uv run python3 -m pytest -q tests/test_jmap.py and make check on the branch. The failure set must match the pristine base, with two more passing tests in tests/test_jmap.py. [verification]

Change: README.md:192: append checkpoint_gap_seconds (seconds with no writes for Litestream; 0 disables, otherwise 2 to 60) and checkpoint_gap_every (backfill batches between quiet gaps, across all accounts) to the [sync] keys cell, worded verbatim from config.example.toml:33-34. tests/test_jmap.py: add two tests in the # Backfill section, after test_an_interrupted_backfill_resumes_without_duplicates. Mirror tests/test_ingest.py:123-153: a RecordingStop(threading.Event) whose wait records (timeout, store._conn.in_transaction, len(store.source_flags("fm"))) and returns False; inject it via QuietGap(store, seconds, every) and gap.stop. Build the source as in test_idle_off_opens_no_stream (tests/test_jmap.py:943-955): config.model_copy with sync batch_size=1, then JmapSource(config.account("fm"), store, cfg, gap=gap), closed in finally. Gap on: QuietGap(store, 2, 2) over 5 INBOX emails; assert added==5 and waits == [(2.0, False, 2), (2.0, False, 4)]. Gap off: QuietGap(store, 0, 2); assert no waits (optionally monkeypatch store.quiet to fail if called). This exercises the hook at src/mail_mind_mcp/jmap.py:623-624. No src/ changes.

Files: README.md · tests/test_jmap.py

Decision: accept the 2 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-02-document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-02-document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap.md

### ⏸ SVD architect gate: dev/mail-mind-mcp#123 document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap **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 `additive` · dispatch effort `low` **Run:** `20261102T063839Z-c4d2393f` **Held because:** CLEAN but 2 open risk(s) (1 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. The JMAP backfill hook (src/mail_mind_mcp/jmap.py:623-624) discards QuietGap.after_batch()'s return value. The IMAP hook (ingest.py:239-240) breaks the backfill when it returns True, which happens when stop is set during a gap. Should a follow-up issue make JMAP honour the stop the same way? It is out of scope for #123; the spec's tests deliberately assert neither behaviour. [decision] 2. The suite could not be run in the Half-A sandbox (.venv unreadable). After dispatch, run `uv run python3 -m pytest -q tests/test_jmap.py` and `make check` on the branch. The failure set must match the pristine base, with two more passing tests in tests/test_jmap.py. [verification] **Change:** README.md:192: append `checkpoint_gap_seconds` (seconds with no writes for Litestream; 0 disables, otherwise 2 to 60) and `checkpoint_gap_every` (backfill batches between quiet gaps, across all accounts) to the [sync] keys cell, worded verbatim from config.example.toml:33-34. tests/test_jmap.py: add two tests in the # Backfill section, after test_an_interrupted_backfill_resumes_without_duplicates. Mirror tests/test_ingest.py:123-153: a RecordingStop(threading.Event) whose wait records (timeout, store._conn.in_transaction, len(store.source_flags("fm"))) and returns False; inject it via QuietGap(store, seconds, every) and gap.stop. Build the source as in test_idle_off_opens_no_stream (tests/test_jmap.py:943-955): config.model_copy with sync batch_size=1, then JmapSource(config.account("fm"), store, cfg, gap=gap), closed in finally. Gap on: QuietGap(store, 2, 2) over 5 INBOX emails; assert added==5 and waits == [(2.0, False, 2), (2.0, False, 4)]. Gap off: QuietGap(store, 0, 2); assert no waits (optionally monkeypatch store.quiet to fail if called). This exercises the hook at src/mail_mind_mcp/jmap.py:623-624. No src/ changes. **Files:** `README.md` · `tests/test_jmap.py` **Decision:** accept the 2 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-02-document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-02-document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/mail-mind-mcp#123 document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap completed integration verify.

  • PR: #134
  • Branch: feat/svd-dev-mail-mind-mcp-123-document-the-quiet-gap-keys-in-cbcd815c
  • Commit: 6db0e083c0
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Checks: PR #134 head 6db0e08: no remote checks or commit statuses exist. Local pytest: 815 passed, 8 skipped, 18 deselected. No blockers.
  • Warning: No CI exists for the PR head: the Forgejo commit statuses list is empty and the repo has no CI directories (CI files belong to the architect).
  • Warning: Open risk 1 stays open: the JMAP backfill hook ignores the return value of after_batch(). Out of scope. A follow-up issue for IMAP/JMAP parity is left to the operator.
  • Warning: Verification ran pytest (-m 'not integration') rather than the full make check; lint, mypy and pip-audit were not rerun in this invocation.
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261102T065351Z-cbcd815c --confirm-merge)
spec-verify-dispatch Half B for dev/mail-mind-mcp#123 document-the-quiet-gap-keys-in-the-readme-and-test-the-jmap completed integration verify. - PR: https://git.groupthink.asia/dev/mail-mind-mcp/pulls/134 - Branch: feat/svd-dev-mail-mind-mcp-123-document-the-quiet-gap-keys-in-cbcd815c - Commit: 6db0e083c01631fb9d3bbd3ff503ed6e75708910 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Checks: PR #134 head 6db0e08: no remote checks or commit statuses exist. Local pytest: 815 passed, 8 skipped, 18 deselected. No blockers. - Warning: No CI exists for the PR head: the Forgejo commit statuses list is empty and the repo has no CI directories (CI files belong to the architect). - Warning: Open risk 1 stays open: the JMAP backfill hook ignores the return value of after_batch(). Out of scope. A follow-up issue for IMAP/JMAP parity is left to the operator. - Warning: Verification ran pytest (-m 'not integration') rather than the full make check; lint, mypy and pip-audit were not rerun in this invocation. - Decision: review the PR and merge? (`codex-svd ship --run-id 20261102T065351Z-cbcd815c --confirm-merge`)
svc-svd-writer 2026-11-02 07:16:42 +00:00
  • closed this issue
  • removed the
    svd:go
    label
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.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#123
No description provided.