Skip to content

Spec: Dismissal, and an Inbox that learns from GitHub that the Day shift acted - #1208

Merged
JacobStephens2 merged 50 commits into
mainfrom
issue-919
Oct 24, 2026
Merged

JacobStephens2 merged 50 commits into
mainfrom
issue-919

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Needs you and Ready for review now learn when the Day shift has acted on GitHub, and accept a reversible Dismissal from the CLI or Command details. This delivers the whole Spec across all nine Tickets.

Command records + Dismissals + kept GitHub facts
  -> shared Inbox groups, departure reasons and retention
  -> status / status --json / Console + live updates

GitHub facts
  ended Needs you -> issue closed / PR merged / triage finished
  Ready for review -> PR merged or closed
  Architect / Security -> dispatched work + independent Finding waits
Dismiss / Undo
  whole row, including collapsed failures; new uncovered kinds return
Resolved
  retain from settlement, later Command start or dismissal
History
  freeze facts and their observation times; stop reading GitHub

Closes #919

  • thirdshift dismiss <command> [--undo] [--json] and authenticated, CSRF-checked Console forms share one mutation. Dismissal changes only the Inbox, never stops work or writes GitHub, records the actor/source in the Activity log, and accumulates covered kinds across the row.
  • The Console reads GitHub each minute off its async thread; status shares the kept answer and refreshes it when missing or over five minutes old. Batched issue/PR reads and paginated private finding lists preserve the 500-unit quota reserves, retain facts through failures, and warn about stale answers or quota pauses. Changed facts wake pages; unchanged reads stay quiet.
  • GitHub moves only ended rows. Open known work waits without an age limit; unknown/unread rows can age straight to History. Dismissals hold through GitHub changes, Undo follows current facts, and failed Security fixes retain independent findings. JSON exposes per-subject facts and observation times alongside dismissal and departure details.
  • The review of the whole Spec fixed three reproduced integration defects: missing row observation times, later GitHub settlement extending dismissal retention, and overlapping Commands masking a valid later start. It also grouped departure details, shared the Stop/Dismiss Unix-user lookup, clarified the fake GitHub reader's name, and updated the guide and hand-written site pages.

Test seams

  • The thirdshift binary, using Scenario Command records and the fake gh, for groups, GitHub answers, reasons, retention, Dismiss/Undo and Activity log lines.
  • The Console over HTTP for authenticated Dismiss/Undo, Command details, background refresh and live page updates.

Evidence

  • CI repair before: github::failure_warning_wakes_open_inbox_and_recovers timed out in the failed test job and in local repetition. An in-flight successful GitHub read overwrote the test's aged cache timestamp, leaving the answer fresh and correctly suppressing the warning.
    After: the test waits for status --json to expose the retained failure before aging the answer, and checks that a fresh answer does not warn. cargo test --test console github::failure_warning_wakes_open_inbox_and_recovers -- --exact passed 30 consecutive runs. The existing event-stream timeout, warning, cached-row and recovery assertions remain in place.
  • CI repair validation: /usr/bin/time -p scripts/affected-tests origin/main passed all 49 site tests and the full Rust suite via cargo test. Wall time: 1199.83 seconds, including Cargo's build phase with a warm cache. cargo fmt --check, cargo clippy --all-targets -- -D warnings and git diff --check passed.
  • Before: each reviewer-proposed regression below failed on the reported behavior.
    After: each exact command passes, and all three tests are retained:
    • cargo test --test status review_open_pr_row_exposes_when_github_observed_it -- --exact
    • cargo test --test status review_github_settlement_does_not_restart_dismissal_retention -- --exact
    • cargo test --test status review_later_start_after_end_is_found_despite_an_earlier_overlap -- --exact
  • cargo test --test status --test dismiss --test stop --test console: 197 passed, 4 fixture-entry tests ignored. This includes issue/finding JSON facts, frozen History timestamps, unchanged background reads, return kinds, authenticated Dismiss/Undo and unchanged Stop behavior.
  • node --test --test-name-pattern='Dismiss keeps Undo' console/tests/inbox.test.cjs: 1 passed, including the open document and another Inbox updating.
  • cargo fmt --check and git diff --check: passed. npm run docs --prefix site regenerated the manual.
  • /usr/bin/time -p scripts/affected-tests main: passed, including 49 public-site tests and the full Rust suite (cargo test, since nextest was unavailable). Total wall time: 1236.12 seconds, including compilation.
  • npm test --prefix site: all 49 passed again after the final inbox.days wording correction and manual regeneration.

Unaddressed findings

Standards

  • S2, possible Primitive Obsession (src/logs/dismiss.rs:23, :92): declined. Persisted string kinds preserve older single-kind and accumulated-kind sidecars; covering normalizes the legacy form, while producers use the existing NeedsYouKind taxonomy and READY_KIND. A second closed enum would duplicate the taxonomy and narrow compatibility. The Dismiss suite passed its single_kind_dismissal_files_keep_their_kind_when_another_is_added regression. This is an implementation judgment; no Spec decision is pending.

Spec

All three behavioral findings were reproduced and fixed. Two test-scope observations remain for the Day shift in #1243, filed with only needs-triage:

  • Browser-test exception: Spec Testing Decisions say no browser-side tests, but console/tests/inbox.test.cjs:66 verifies the submit handler preserves Command details and Undo in the same document. The exact browser command above passes and exercises behavior an HTTP post cannot. Retained pending the Spec owner's decision in #1243 on this exception.
  • Kept-fact/internal-test exception: Spec Testing Decisions limit cache edits to age and tests to the binary/HTTP seams. src/logs/reading/tests.rs:306 calls Snapshot directly; tests/status.rs also sets cached triage times, reset clocks and legacy fields. These fixtures cover elapsed retention, quota reset and compatibility; the passing focused suite exercises those paths. Retained pending the decision in #1243 on exceptions versus replacement coverage.

Security

No unaddressed introduced findings.

Security review outcome

No unaddressed introduced findings.

Review coverage

Standards: 4 P3 judgment calls, 3 addressed and 1 declined; no hard standards violation. Spec: 3 P2 behavioral findings, all reproduced and fixed; test-scope observations are recorded above. Each independent reviewer read all 48 changed files from main...HEAD, including Cargo.lock and generated site/docs/index.html, plus supporting standards, domain docs and ADRs. Neither axis has unread changed files or generated-output exclusions. The parent inspected and validated the subsequent fixes; no new changed paths were added.

Reports with each axis's final files-read list are retained with the Session trace as standards.md and spec.md in .thirdshift-review-zcfL2T/.

Merge Danger

Door: two-way

Blast Radius: Inbox

Changes affect local Inbox presentation, kept GitHub facts and Dismissal sidecars.

Incorrect or unavailable GitHub facts can leave a row waiting or move it to another group; the cache retains the last answer and exposes failures. The read path does not mutate GitHub, Claims or running Commands. Rollback can reuse the stored string kinds, and the GitHub answer remains a disposable cache.

Built with codex · gpt-6.1-sol · xhigh

Tickets

A row a later Command takes up stays in Resolved for inbox.days from
that Command's start instead of going straight to History, and says
why it left in status, status --json and on its Console row. Rows that
never waited still go by when they ended; rows that age out still go
straight to History. The Console wakes at the new boundary.

Closes #1190
Spec review: a row superseded while still live never waited, so it
carries no take-up reason and stays on its ended-time path. Standards
review: render the take-up line through one InboxItem helper instead
of twice.
Resolved counts from when a row stopped waiting
status looks up every ready row's pull request in one batched GraphQL
query, asking for each one's state and merge or close time and the query's
own rateLimit, and keeps the answer in one file per machine for 5 minutes.
A merged pull request takes its row to Resolved for inbox.days from the
merge time, a closed one from the close time; an open one keeps its row
however old it is. Reopened rows come back while in Done or Resolved, and
History rows are not read again. status --json reports each row's GitHub
facts and the answer's age.
thirdshift dismiss names a Command as stop and show do and gives its
Needs you or Ready for review row a Dismissal, kept beside the Command
record with who, when, CLI or Console, covered rows and kind. The row
leaves for Working or Landing live, otherwise Done, Resolved or History,
saying dismissed by and who; Resolved holds it for inbox.days after the
dismissal. Collapsed failures dismiss every Command they stand for, and
--undo takes a dismissal back wherever the row now is.

Closes #1191
Guide now names all four rows GitHub can't speak for and the History
freeze. Two more tracer tests: reopen-from-Done and a failed GitHub read
keeping the last answer. Small cleanups: one record_pull_request helper,
one event_time helper, github_moved naming.
cargo fmt --check failed on the dismiss files this branch added.
No logic changed.
…ror: function_call_arguments.done name mismatch for `fc_01a16b5348787389b5a11e30ce602db4` (request id: 15dda57c-2635-4605-87a3-c8e38f050348, response: resp_6adbfcbbfb2b673229854061))

2026-10-24T02:17:21Z, host stephens. Uncommitted work at the time of failure is included in this commit.
…id=c05b0a88-938d-4d00-b14b-69141da0811f]: Subscription quota exhausted. Your usage window resets at 2026-10-24T03:28:16Z. (rate_limit_error))

2026-10-24T02:17:29Z, host stephens. Uncommitted work at the time of failure is included in this commit.
Dismiss and take back an Inbox row from the CLI
Add Dismiss and Undo to Console Command details
Preserve GitHub ready-row exits and CLI dismissals, share the kept GitHub answer with dismissal selection, and regenerate the combined manual. Add binary regressions for dismissal across GitHub refreshes and reopening.

Validation: scripts/affected-tests origin/issue-919 passed (2469 Rust tests, 49 site checks; 2254.01 seconds including compilation). cargo check, focused status/dismiss tests, clippy with warnings denied, and formatting checks passed.
Preserve the architecture descriptions of GitHub Inbox reads and Console Dismiss/Undo. Pass the kept GitHub answer into Console dismissal availability so it follows the same grouping as the Inbox and CLI; cover merged and old-open pull requests through HTTP.
Ready for review learns from GitHub (#1194)
Keep the shared CLI/Console Dismiss and Undo operation from #1193 together
with #1192's accumulated dismissal kinds, legacy file compatibility and
whole-row return rules. Preserve Console account attribution and combine
both branches' site documentation and domain-to-code pointers.

Add a Console HTTP regression for dismissing a Silent Command, returning
after failure and dismissing again with both kinds retained.

Validation:
- cargo check --all-targets
- cargo clippy --all-targets -- -D warnings
- cargo fmt --check
- CLI dismissal tests: 24 passed; Console dismissal tests: 5 passed
- npm test --prefix console: 68 passed
- scripts/affected-tests origin/issue-919: passed, including all 49 site
  checks and the full Rust suite; 2398.03 seconds wall time with compilation
Refresh the Console Inbox from GitHub every minute
Preserve accumulated dismissal kinds and recent-dismissal retention alongside GitHub-aware ready-row grouping. Combine the manual and architecture changes, and regenerate the manual page.

Validation: cargo check; cargo fmt --check; scripts/affected-tests origin/issue-919. All 2,482 Rust tests and 49 site checks passed; 57 Rust fixture tests ignored. Full selector wall time: 2,211.86s, including 1m 06s Rust compilation.
Preserve both the homepage dismissal-kind return rule and the Console background GitHub refresh description.

Validation: cargo check, cargo fmt --check, and cargo clippy --all-targets -- -D warnings passed. scripts/affected-tests origin/issue-919 passed all 2487 Rust tests across 58 binaries (57 ignored) and 49 site checks. Wall time: 2802.34 seconds, including 31.18 seconds of Rust compilation.
Combine the Console minute refresh with Needs you issue and pull request reads. Preserve row-specific History facts, Triage observation times, and quiet unchanged reads; update the manual and site pages to describe both changes.

Add an HTTP/binary regression for a background issue closure resolving an old failed row and sharing the kept answer with status.

Validation: scripts/affected-tests origin/issue-919 passed all 49 site tests and the full Rust suite (2796.89 seconds including compilation). cargo clippy --all-targets -- -D warnings and cargo fmt --check passed.
Bring dismissed Inbox rows back for uncovered kinds
Preserve GitHub settlement and retention alongside accumulated dismissal kinds and recent-dismissal retention. Regenerate the manual and cover dismissal, GitHub settlement, and Undo together through the binary.

Validation: scripts/affected-tests origin/issue-919 passed (full Rust suite and 49 site checks; 1906.13 seconds). cargo clippy --all-targets -- -D warnings and cargo fmt --check passed.
Preserve Inbox failure/quota documentation alongside accumulated dismissal kinds, and regenerate the manual HTML.

Validation: cargo check, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and scripts/affected-tests origin/issue-919 passed. The affected-test selector used cargo test and completed in 1908.99 seconds wall, including Rust compilation and all 49 site checks.
Preserve GitHub issue settlement and History facts alongside Inbox failure diagnostics, last-answer times, shared quota reserves and refresh locking. Combine the site documentation and regenerate the manual. Extend regressions to cover Needs you issue facts during failed or quota-deferred reads and legacy cache migration.

Validation: cargo check, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and scripts/affected-tests origin/issue-919 passed. The affected-test run used cargo test: 2,504 Rust tests passed (57 ignored), and all 49 site checks passed, in 1,219.21 seconds wall including compilation.
Keep Inbox answers through GitHub failures and low quotas
Resolve Finding rows once their private records are triaged
@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 24, 2026 10:56
Preserve Inbox dismissals and GitHub settlement alongside active-run totals, Resources routes, and the shared Console stream lifecycle. Regenerate the manual and retain both branches of regression coverage.

Keep Console headings visible on laptop screens with the GitHub warning and active-run summary, and retain both new commands within the compact help budget.

Validation: scripts/affected-tests origin/main passed (1196.40 seconds); 46 affected Console browser checks passed; cargo check --all-targets, cargo clippy --all-targets, cargo fmt --check, and git diff --check passed.
A successful background read can finish after the test ages its cached answer, resetting freshness and suppressing the expected warning. Wait for status --json to expose the retained failure before aging the answer, and assert that a fresh answer does not warn.

Validation: 30 consecutive focused runs; scripts/affected-tests origin/main (49 site tests and the full Rust suite, 1199.83 seconds with a warm build cache); cargo fmt --check; cargo clippy --all-targets -- -D warnings.
@JacobStephens2
JacobStephens2 merged commit ce8b4bb into main Oct 24, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-919 branch October 24, 2026 12:18
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec: Dismissal, and an Inbox that learns from GitHub that the Day shift acted

1 participant