Public: anyone can read this; the crew can change it.

An issue held behind the Later gate can be snoozed until a date #13138

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Lift now offers "until a date" on the held page, in the terminal and in the MCP lift tool. The gate takes the issue back at the start of that day, UTC. I ran only a targeted set of tests, not the full suite.

Notes

shipped production is serving it deploy 59903fa

opened this

Lift now offers "until a date" on the held page, in the terminal and in the MCP lift tool. The gate takes the issue back at the start of that day, UTC.

I ran only a targeted set of tests, not the full suite. They cover the new test file, the MCP size, event audience, feature docs and the existing later-gate and lift tests; all pass, as do bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts. bun scripts/fast.ts found the diff too broad to name tests, so I picked them myself. test/schema-migrations.test.ts timed out once when run alongside four other files. It passed alone, 26 of 26. I did not exercise the date field in a browser or the u key in the terminal, so the page and terminal are covered only by the shared action's tests.

  • Held page: a date field and a "Lift until" button sit beside Lift, on the banner at the top of a held issue and on each row of /held.
  • Terminal: u on the held screen asks for the day.
  • MCP lift: it takes an optional until (YYYY-MM-DD). I added no new tool, and test/mcp-size.test.ts passes.
  • Bad dates: a past date, today, or anything that isn't a real YYYY-MM-DD day is refused with "Pick a day after today, written YYYY-MM-DD." Nothing moves. The sentence is the same on all three surfaces.
  • Coming back: the lift happens at once, and a row in a new gate_snooze table (migration 20261115120000-gate-snooze, pinned) records the day. A job in src/engine/duties.ts, the forge's existing duties timer, runs each minute and on boot. When the day comes it puts the issue behind the gate again, as the person who snoozed it, which also restores the Later label.
  • Events: issue.snoozed and issue.snooze_ended are recorded and registered in core/event_audience.ts with the other gate events.
  • Plain lift: it clears the snooze, so a later day brings nothing back.
  • Tests: the new test/gate-snooze.test.ts proves the issue is still out at 23:59:59 the day before and held again at 00:00:00 on the day. It also covers refusal of past and invalid dates and a plain lift clearing the snooze.
  • Docs: docs/features/later-gate.md loses its Not-done line for the date. I kept "snoozing until new activity" as not done, because the issue asked only for a date.

The until argument isn't offered when reviving an issue the gate review closed. The pre-push hook needed a "Try:" commit line, so there is an empty commit with one.

To try it, open a held issue, pick a day after today, and press "Lift until".

🤖 Generated with Claude Code

Closes #13113

5 earlier comments · 1 event
commented

Lift now offers "until a date" on the held page, in the terminal and in the MCP lift tool. The gate takes the issue back at the start of that day, UTC.

I ran only a targeted set of tests, not the full suite. They cover the new test file, the MCP size, event audience, feature docs and the existing later-gate and lift tests; all pass, as do bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts. bun scripts/fast.ts found the diff too broad to name tests, so I picked them myself. test/schema-migrations.test.ts timed out once when run alongside four other files. It passed alone, 26 of 26. I did not exercise the date field in a browser or the u key in the terminal, so the page and terminal are covered only by the shared action's tests.

  • Held page: a date field and a "Lift until" button sit beside Lift, on the banner at the top of a held issue and on each row of /held.
  • Terminal: u on the held screen asks for the day.
  • MCP lift: it takes an optional until (YYYY-MM-DD). I added no new tool, and test/mcp-size.test.ts passes.
  • Bad dates: a past date, today, or anything that isn't a real YYYY-MM-DD day is refused with "Pick a day after today, written YYYY-MM-DD." Nothing moves. The sentence is the same on all three surfaces.
  • Coming back: the lift happens at once, and a row in a new gate_snooze table (migration 20261115120000-gate-snooze, pinned) records the day. A job in src/engine/duties.ts, the forge's existing duties timer, runs each minute and on boot. When the day comes it puts the issue behind the gate again, as the person who snoozed it, which also restores the Later label.
  • Events: issue.snoozed and issue.snooze_ended are recorded and registered in core/event_audience.ts with the other gate events.
  • Plain lift: it clears the snooze, so a later day brings nothing back.
  • Tests: the new test/gate-snooze.test.ts proves the issue is still out at 23:59:59 the day before and held again at 00:00:00 on the day. It also covers refusal of past and invalid dates and a plain lift clearing the snooze.
  • Docs: docs/features/later-gate.md loses its Not-done line for the date. I kept "snoozing until new activity" as not done, because the issue asked only for a date.

The until argument isn't offered when reviving an issue the gate review closed. The pre-push hook needed a "Try:" commit line, so there is an empty commit with one.

To try it, open a held issue, pick a day after today, and press "Lift until".

🤖 Generated with Claude Code

commented

This push fixes the failing gate on #13138. Only comments were rewrapped, with no behaviour change. bun scripts/gate.ts and bun x tsc --noEmit are clean, and test/gate-snooze.test.ts passes (5 tests). I did not run the full suite; the forge runs it on this push.

  • Comment wrapping: I rewrapped three lines to 100 columns, in src/core/gate_snooze.ts, the migration 20261115120000-gate-snooze.ts and test/gate-snooze.test.ts.
  • "both doors" rule: I added no terminal screen or how-to. The commit message carries a No door: line saying the terminal and MCP already lift until a date through the existing held screen and tool. I did not open src/tui/screens/ or the MCP tool to confirm that this pull's change reaches them, so a reviewer should check it.
  • "before/after looks" rule: I took no pictures. The same commit message carries a No look: line, because the held page needs an open held issue and is not among the app.looks pages in forge.json. If you would rather have before/after pictures, name a page in app.looks and I'll add a Looks: line instead.

To try it: open a held issue, pick a day after today beside Lift, and press "Lift until".

🤖 Generated with Claude Code

commented

This push fixes the failing gate rule. Comment lines that ran past 100 columns in src/core/event_audience.ts, src/engine/duties.ts and src/web/pages/gate.ts are now rewrapped.

  • Cause: The check merges the branch into the current main. Main had picked up comment lines over 100 columns in those three files. They were not on my branch alone, which is why the gate passed here before I merged.
  • Fix: I merged origin/main into the branch, ran bun scripts/gate.ts --fix, and committed what it rewrapped. Only comments changed, no code.
  • Local checks: bun scripts/gate.ts and bun x tsc --noEmit both pass after the rewrap. I did not run any tests this round, since only comment whitespace changed. The forge's full check runs on this push.
commented

I fixed two of the four failures and pushed. The other two passed when I reran them locally, so I made no change for them.

  • docs/MCP.md: the tool table was stale for the new lift tool. I regenerated it with bun scripts/mcp-table.ts.
  • job-slices test: the gate-snooze job in src/engine/duties.ts was in neither the timed jobs nor UNTIMED. I added it to the timed jobs in test/job-slices.test.ts so it is measured like the others.
  • Terminal r test and first-view budget test: test/features-tui.test.ts and test/attention.test.ts both pass locally. The check log shows attention.test.ts was already red on main for the same tests, so it wasn't counted against this pull. I don't know why the terminal one failed in the check; load across the shards is my guess.

I merged the latest main first. Locally, bun scripts/gate.ts, bun x tsc --noEmit and the five test files I reran pass. I did not run the full suite, since the forge runs it on the push.

commented

This push fixes the gate failure and changes no behaviour. The gate rule "comments are wrapped at 100 columns" flagged a comment line in test/job-slices.test.ts that was too long. I ran bun scripts/gate.ts --fix, which rewrapped it, and committed the result.

After the rewrap, bun scripts/gate.ts and bun x tsc --noEmit both pass locally. I did not rerun the tests here, since the change only moves comment line breaks. The forge's check will run them on this push.

The pull's earlier content is unchanged. It times the gate-snooze job in job-slices and regenerates the MCP tool table for lift.

Changes requested — before the latest push

Core logic is sound (UTC day, validation before any move, migration pinned, README untouched, later-gate.md updated). Changes needed, in one round:

  1. Fix first: the until on a Revive (closed-by-review row) is silently ignored, yet every surface says 'lifted until <day>'. /held shows the date form on closed rows too. Either refuse until on a revive with one sentence, or honour it; do not report a snooze that was not made.
  2. Tests cover only the action. Add a test for each door that would fail without the change: the web POST /issues/N/lift with until (bad date flashes BAD_DATE, good date snoozes), the MCP lift with until (bad, good, non-string), and the TUI u prompt on the held screen.
  3. returnSnoozed deletes the snooze before it checks or relinks; if linkIssue fails (e.g. the setter lost write access) the issue silently never returns. Keep the row until the relink succeeds, or fall back to a recorded event/attempt.
  4. MCP: a non-string until is ignored and becomes a plain lift. Refuse it (bad_date) instead.
  5. Web: add min (tomorrow) to the date input so the browser helps; the server check stays.
commented

All five points are fixed and pushed to the branch. The new door tests and the neighbouring suites pass locally (later-gate, tui-held, mcp, job-slices, plus the two files below), and the gate, tsc and design-lint are clean. I did not run fast.ts's full list. It named 2,381 of 3,340 files, so I ran only those suites. The forge's check runs the rest.

  1. Revive with until: liftHold now refuses it with a new error, revive_until, and moves nothing. The sentence is REVIVE_UNTIL, in src/core/gate_snooze.ts. The web page, the MCP tool and the TUI all show it, so none of them reports a snooze that was not made. A closed row on /held never had a date form, only Revive. In the TUI, u on a closed row now toasts that sentence instead of doing nothing.
  2. Door tests:

- Web: /issues/N/lift with a bad date flashes BAD_DATE and holds; a good date snoozes; a revive with a day is refused; the date input carries min. - MCP: lift with until covers a bad date, a non-string, a good date and a revive. - TUI: the u prompt keeps itself open on a bad day and snoozes on a good one. - Action: a revive refused with a day, and a return that fails and is retried. - I did not run them against the old code to confirm they fail without the change.

  1. returnSnoozed: the snooze row is now cleared only after the relink succeeds. If linkIssue fails, the row stays, a warning is logged, and the next tick retries. A permanent failure therefore retries on every tick and logs each time. I chose that over dropping the snooze, and I did not add an attempt record. Rows for an issue that is gone, closed or already held are still cleared.
  2. MCP: a non-string until is now refused with bad_date.
  3. Web: the date input has min set to tomorrow (UTC). The server check is unchanged.
Approved

All five earlier asks are met: a revive with a day is refused on all three doors (revive_until); each door has a test; a failed return keeps the snooze row and retries; MCP refuses a non-string until; the date input carries min. The day check runs before anything moves, the date is parsed strictly, and the migration is additive and pinned. Non-blocking: (1) a return that fails for good (the setter lost rights) retries and logs every minute, so a later pass could cap attempts. (2) the nested ternary in src/web/pages/gate.ts has one misindented branch. (3) the later-gate.md line still says Not done for new activity, which is true and outside this issue.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs