Skip to content

Inbox slice G: request_human_input questions become asks rows - #2780

Merged
simple-agent-manager[bot] merged 13 commits into
mainfrom
sam/implement-slice-g-inbox-d8an6x
Nov 16, 2026
Merged

simple-agent-manager[bot] merged 13 commits into
mainfrom
sam/implement-slice-g-inbox-d8an6x

Conversation

@simple-agent-manager

@simple-agent-manager simple-agent-manager Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Inbox slice G (spec: SAM idea 01M7G03ZCQ6TM6CMEYDRKQ8ST9, decision 8 "one record per ask, in D1"). A question an agent asks with request_human_input is now one asks row (kind question) and nothing else: the row is the record of truth for the question, its status and its answer. No attention marker, no session_summaries.attention_json copy.

  • Create (routes/mcp/human-input-tool.ts → services/inbox/question-asks.ts:fileQuestionAsk): same inputs and limits; filed through the shared createAsk (assignee = the task owner; per-chat cap inbox.openItemsPerChat; title = first sentence capped at inbox.titleMaxChars; body = the full question). Same notification and push, linked to the ask (notification_id). Tool result shape unchanged; humanInputRequest.id is the ask id.
  • Answer (one path for the chat card, notification deep link, sam_agent_answer and the inbox answer route): answerAttention (routes/chat-attention.ts) reads the ask first; answerQuestionAsk does a compare-and-set open → answered bound to project + chat + kind, delivers the answer as a durable prompt (deliverInboxAskNotice, the wake path for a sleeping chat), records notified_at; the inbox sweep retries an undelivered answer. Caller outcomes preserved: accepted (200), already answered with the same answer (200 alreadyResolved), still being delivered (202 inFlight), different answer being delivered / already resolved (409), invalid option (400).
  • Typed chat message answers the chat's open questions (as it resolved markers): ProjectData message persistence and human prompt acceptance call closeQuestionAsksForHumanMessage.
  • Reminders and expiry keep today's schedule (window, reminder points, undelivered grace, hard maximum) but run from asks in the 5-minute inbox sweep, from admin settings inbox.questionTimeoutMinutes, inbox.questionFirstReminderPercent, inbox.questionSecondReminderPercent, inbox.questionUndeliveredGraceMinutes, inbox.questionMaxWaitMinutes. An expired question ends expired and has today's task outcome (ProjectData.expireQuestionAsk reuses the marker-expiry consequence).
  • No web change: the attention GET/resolve routes accept an ask id in place of a marker id (ask first, marker fallback) with today's response shapes; the chat list (D1 index + ProjectData fallback), ProjectData session reads (team status, account map), idea "question" status, Connector reads and live attention.created / attention.resolved socket events all show asks-era questions.
  • Permission mirrors untouched (InteractionStore, acp_interaction markers, attention_json) until slice J.

Marker-era vs asks-era during the overlap (no data migration)

Question asked before deploy (marker) Question asked after deploy (asks row)
Inbox attention:<sessionId>:<markerId> from attention_json (as in slice A) ask:<id> from asks
Chat card / notification attention routes read the marker (ask lookup misses) same routes read the ask
Answer DO claim → live prompt (unchanged) CAS on asks → durable prompt
Archive DO archive claim (unchanged) asks → archived + notice
Typed chat message resolves markers (unchanged) closes the chat's open asks
Reminders / expiry DO alarm with HUMAN_INPUT_* (unchanged) inbox sweep with inbox.question*
Ends when answered or at its hard limit (≤ 24 h default) —

Tests: marker-era archive and answer paths (inbox-capability.test.ts "a marker-era question…", notification-push-do.test.ts free-form marker, chat-attention-reader.test.ts, chat-prompt-cancel.test.ts); asks-era everywhere else. Removing the marker-era question code after the drain is idea 01M7HC7CN5WY6GEP9G0PP4DG7B.

Rule 44 inventory (every writer and reader)

Every writer and reader of question markers (kind needs_input) and of
session_summaries.attention_json, and what it does after this slice. "Marker-era" = keeps
serving questions that existed as markers at deploy until they resolve (max 24 h by default);
removal tracked in the follow-up idea filed with this PR.

Writers

Path Before After
routes/mcp/human-input-tool.ts (request_human_input) createAttentionMarker + linkAttentionNotification fileQuestionAsk → createAsk (asks row) + linkQuestionNotification (asks.notification_id); no marker
ProjectData.createAttentionMarker RPC (request_human_input branch: resolves check-ins) ran for questions branch removed; check-in resolution moved to ProjectData.recordQuestionAsked
ProjectData.linkAttentionNotification + client question notification link removed (no caller)
answerAttention (routes/chat-attention.ts; callers: resolve route, ports.chat.answerAttention → sam_agent_answer, inbox answer) DO claim → live prompt → complete ask first: answerQuestionAsk CAS + durable prompt + notified_at; marker-era fallback unchanged
archiveAttention (inbox port, attention: refs) DO archive claim marker-era only; asks archive via archiveInboxItem (closeAsk + notice)
message-persistence.ts:resolveAttentionForRoles, durability-foundation.ts (human message) resolve all markers unchanged for markers; also closeQuestionAsksForHumanMessage (asks → answered, notified)
attention-expiry.ts (DO alarm: expiry, escalation, undelivered grace, task outcome) questions marker-era only; asks: inbox sweep (services/inbox/sweep.ts) + ProjectData.expireQuestionAsk (reuses failExpiredTaskMarker)
interaction-store-attention.ts (permission mirrors), reconciliation*.ts, idle-cleanup*.ts, wake-failure.ts, provider-limit-attention.ts own kinds/sources unaffected (not questions)
session-summary-sync.ts (writes attention_json) copies newest marker unchanged; asks are never copied into it

Readers

Reader After
GET …/attention/:id (chat card, notification reader) ask first (same response shape), marker fallback
Chat list D1 index (services/session-summary-index.ts) one project read of open question asks merged into attention; live ranking counts chats with an open question
ProjectData listSessions / getSessionsByTaskIds / getSession (chat list fallback, team status team-core.ts, account map routes/account-map.ts) withQuestionAttention merges open question asks
Web useSessionReducer live events attention.created from recordQuestionAsked; attention.resolved from answer/archive delivery accept, typed message, expiry
Inbox list/count (inbox-list-core.ts) asks part lists questions; attention part lists permission mirrors + marker-era questions
Connector sam_chat_read / sam_chat_interactions / sam_work_changes (attention-core.ts) markers + open question asks, one projection
Connector sam_chats_list / sam_projects_list (connector-read-core.ts) attention merged / count includes open question asks
Stalled-task classifier (scheduled/stalled-task-classifier.ts) hasOpenQuestionAsk (D1) + marker check
Reconciliation candidates (check-in hold) candidate deferred one lease while an open question ask exists (resolveCandidateProjectId D1 query)
Idea "question" status (idea-work.ts) mergeQuestionAsks
Project Overview running section (F1, packages/operations/src/project-overview.ts, rebased in after #2775) open_questions CTE over this project's open, unexpired question asks: such a chat is waiting, ranked first and counted; the summary's attention_json still covers other markers
Archive sharding (archive-sharding.ts) unaffected: asks expire within inbox.questionMaxWaitMinutes (≤ 3 days) long before the 7-day archive grace
VM agent no reference (verified)
HUMAN_INPUT_TIMEOUT_MS removed (replaced by inbox.questionTimeoutMinutes); the other three HUMAN_INPUT_* remain for marker-era questions

Round trips of the changed hot paths (rule 60)

Path Before After
request_human_input D1 task read, DO create marker, D1 project name + Notification DO, DO link D1 task read; createAsk: settings, member check, task check, insert (4 D1); settings for the schedule (1 D1, per-isolate cached store); recordQuestionAsked (1 DO); D1 project name + Notification DO; link notification (1 D1). ≈ 8 D1 + 2 DO (mutation budget 12)
Answer (chat card / inbox / Connector) wake auth; DO prepare; live-agent resolve (D1) + mention enrichment; VM prompt; DO complete wake auth (unchanged); loadQuestionAsk (1 D1); CAS (1 D1); notice row (1 D1); acceptPromptDelivery (1 DO); notified_at (1 D1). No VM call: delivery is the durable wake path
Chat list (D1 index path) coverage, count, page (+ live) + 1 D1 open-question read for the project, in the same Promise.all (no added latency)
Chat list (DO fallback), team status DO read + 1 D1 read from the DO for the page's chats (json_each)
Project Overview running read 1 D1 1 D1 (the open-question CTE is part of the same statement, served by idx_asks_open_question)
ProjectData getSession — unchanged (no overlay; no consumer renders it)
Typed human message — + 1 D1 UPDATE … RETURNING after the broadcast and alarm
Sweep (5 min) — per step ≤ inbox.sweepBatchSize rows: reminders (1 D1 read + CAS + push each), expiry (receipt check, CAS, DO outcome), notice retry

Sweep throughput at the outer limit (rule 81): default 10 rows per step per tick = 120 per hour per step; a question needs ≤ 2 reminder rows and 1 expiry row, so 100 questions expiring at once drain in ≈ 50 min (setting goes to 50). Reminders and expiry fire on the 5-minute tick instead of the DO alarm's exact time.

Check-in hold (Cloudflare review H2)

An open question holds SAM's check-in by deferring the reconciliation gate to the question's deadline (questionHold), so the alarm waits instead of re-arming at the lease cadence; every close path releases it (releaseQuestionHold). The release only touches a question hold, never a claim lease or quarantine.

Discrimination evidence (rule 28)

Each guard was weakened once and the named test went red, then restored: answer CAS project/chat (forged snapshot attack), loadQuestionAsk project/chat (attack: an ask id addressed…), typed close project (typed chat message…) and the DO hook wiring (workers a person's chat message answers…), Connector projection project (shows a question held in D1 asks…), stall guard project (consults the model when the asks question is in another project), live-ranking EXISTS (ranks an old chat waiting on a question…), reconciliation hold project (does not hold … in another project). The chat-card GET attack is also protected by the session-access check, so it is defence in depth rather than predicate-discriminating.

Behaviour changes worth knowing

  • HUMAN_INPUT_TIMEOUT_MS is retired (no GitHub Environment overrides existed in staging or production, checked 2026-11-16); the other three HUMAN_INPUT_* stay for marker-era questions.
  • The per-chat cap (inbox.openItemsPerChat) and inbox.bodyMaxChars now apply to request_human_input; hitting one returns INVALID_PARAMS with the reason.
  • The answer reaches the agent as a durable prompt shown as a SAM notice ("The person answered your question (…): …") instead of a user message carrying only the answer text.
  • An answer whose delivery could not be queued is retried by the sweep for inbox.noticeRetryMinutes, and sending the same answer again retries it at once.
  • A grantee can answer from the chat card (as before) but the inbox lists the question for its assignee (the task owner) only.

Validation

  • pnpm lint (affected packages; pnpm check:fast green)
  • pnpm typecheck
  • pnpm test (API unit suite, project-data unit suite, affected Workers suites: inbox-capability, notification-push-do, attention-markers, stalled-task-human-input, session-summary-index-sync, project-data-idea-work, sleep-idle-cleanup-attention, attention-expiry-failed-task-preservation, acp-interaction-store)
  • Additional validation run: scripts/quality/sync-wrangler-config.test.ts, pnpm quality:migration-safety
  • Candidate selection: the reconciliation candidate D1 read adds one correlated subquery per already-selected candidate (bounded by maxCandidatesPerSweep), and a held candidate leaves the alarm until the question's deadline; the inbox sweep's three steps are each bounded by inbox.sweepBatchSize (throughput above)

Staging Verification (REQUIRED for all code changes — merge-blocking)

  • Staging deployment green — staging2, run 43838856327 (lease, deploy, smoke tests all green); migration 0247_asks_questions.sql applied and all six columns present (D1 pragma_table_info)
  • Live app verified via Playwright — N/A as Playwright: this PR changes no web files (slice C owns the web). The live app was exercised through its real API with a workload-identity browser session (staging2-agent-user), the same routes the chat card and inbox call
  • Existing workflows confirmed working — chat list needs-input state, chat card GET/answer, sleep and wake, durable follow-up prompts, Project Overview
  • New feature/fix verified on staging — evidence below
  • Infrastructure verification completed — N/A: no infra changes
  • Mobile and desktop verification notes added for UI changes — N/A: no UI changes

Staging Verification Evidence

staging2, 2026-11-16 09:39–09:55Z, project 01M7HTM8747B16PHS25TQ6WBZA (Artifacts, Claude Code), real agents.

Check Runtime Result
request_human_input → one asks row; inbox item store: "ask"; chat list needs_input with the ask id; card GET (marker-shaped); Project Overview waiting, waitingOnViewer: true Instant pass
Two concurrent answers (inbox eu, card us) Instant exactly one won: card 200; inbox 409 "A different answer is already being delivered"; same-answer replay 200 alreadyResolved: true; agent replied GOT I: us
Archive from inbox Instant 200 archived, agentNotified: true; a later card answer 409 "already resolved"; agent told "archived … will not act on it"
Answer from inbox to a sleeping chat VM chat slept with a snapshot, question still shown on it; inbox answer at 09:47:55Z woke it, active and replying GOT A: eu at 09:49:25Z
Card answer; invalid option VM medium → 400 "answer must match one of the requested options"; large → 200; agent replied GOT B: large
Expiry with inbox.questionTimeoutMinutes = questionMaxWaitMinutes = 1 (both reset to defaults right after) Instant card expired: true at the deadline; the 5-minute sweep set status='expired' at 09:53:09Z; the task failed "Human input request expired after timeout", the marker-era outcome
D1 asks rows afterwards both 3 answered (us, eu, large), 1 archived, 1 expired; every row notified_at set; next_escalation_at = created + 30 min, max_expires_at as configured
  • Codex: not testable on staging2 (only Claude Code keys are provisioned there). The question path is the harness-agnostic MCP tool plus the API; nothing in it branches on the harness.
  • Marker-era overlap: no marker-era questions exist on a freshly rebuilt staging2; covered by the Workers capability test (inbox-capability.test.ts, marker-era answer and archive cases).
  • Found while testing, filed: manual sleep returns 500 when the VM agent's hibernate call exceeds 5 s (tasks/backlog/2026-11-16-manual-sleep-hibernate-timeout-500.md); capacity-pool-edit-query-plan.test.ts sits at the 5 s default timeout and timed out once in CI (tasks/backlog/2026-11-16-capacity-pool-query-plan-test-near-timeout.md). A transient upstream 402 AI inference failed on the VM agent's first turn cleared on retry.
  • Cleanup: both test chats stopped (workspaces deleted), VM node deleted, staging2 lease released (run 43844057826).

UI Compliance Checklist (Required for UI changes)

N/A: no UI changes (no files under apps/web, packages/ui, packages/terminal).

UI Screenshot Evidence

N/A: no UI changes.

End-to-End Verification (Required for multi-component changes)

  • Data flow traced from user input to final outcome with code path citations
  • Capability test exercises the complete happy path across system boundaries
  • All spec/doc assumptions about existing behavior verified against code
  • Manual verification steps documented below

Data Flow Trace

  1. Agent calls request_human_input → routes/mcp/human-input-tool.ts:handleRequestHumanInput → services/inbox/question-asks.ts:fileQuestionAsk → packages/operations/src/inbox-ask-create-core.ts:createAsk (D1 insert) → ProjectData.recordQuestionAsked (check-in resolved, attention.created) → services/notification.ts:notifyNeedsInput → linkQuestionNotification.
  2. Person opens the card / inbox → routes/chat-attention.ts GET (ask first) or inbox-item-core.ts:readStoreRow.
  3. Person answers → answerAttention (card, notification, sam_agent_answer) or inbox-write-core.ts:answerAsk → ports.chat.answerAttention → question-asks.ts:answerQuestionAsk (CAS) → ask-notice.ts:deliverInboxAskNotice → ProjectData.acceptPromptDelivery (source inbox_ask, wake-capable; durability-foundation.ts releases the check-in hold and emits attention.resolved) → notified_at.
  4. Person types in the chat instead → message-persistence.ts / durability-foundation.ts → question-asks.ts:closeQuestionAsksForHumanMessage.
  5. Nobody answers → services/inbox/sweep.ts reminders → undelivered grace → expiry → ask-notice.ts:expireQuestion → ProjectData.expireQuestionAsk → attention-expiry.ts:failExpiredQuestionAsk.

Untested Gaps

  • The VM/Instant wake after the durable delivery is queued is the existing delivery runner's (covered by its own suites); the Workers tests prove one wake-capable inbox_ask delivery on a sleeping chat. The live wake is verified on staging (below).
  • No EXPLAIN QUERY PLAN assertion for the new partial index (idx_asks_open_question).

Post-Mortem (Required for bug fix PRs)

N/A: not a bug fix

Specialist Review Evidence (Required for agent-authored PRs)

  • All local reviewers completed and findings addressed before merge
  • If any reviewer did NOT complete: needs-human-review label added and merge deferred to human (n/a: all completed)
Reviewer Status Outcome
security-auditor ADDRESSED 0 CRITICAL/HIGH. MEDIUM: undelivered answer could stick → same-answer replay retries delivery; filing hard-failed on edge inputs → empty context/options rejected up front, validation errors are INVALID_PARAMS (3de6a8e). LOW: expiry predicate in ranking/Connector reads and index fixed; non-atomic typed close accepted with expiry backstop (humanMessageSince); grantee inbox visibility narrowing documented above
cloudflare-specialist ADDRESSED HIGH: HUMAN_INPUT_TIMEOUT_MS retired in the deploy-script binding test; check-in hold re-armed at lease cadence → hold until the question's deadline + release on close. MEDIUM: typed close after broadcast/alarm; getSession overlay removed; per-step sweep budgets; partial index idx_asks_open_question (3de6a8e, re-verified PASS). LOW: message-timestamp guard and hold through sweep pickup (7d8786f); hold kept until deadline when an answer notice can never be delivered (documented)
test-engineer ADDRESSED HIGH: conjunct-isolating + forged-snapshot attacks, shared reads in every mode, Connector lists, idea merge, list/team overlay, real-SQL hold, authz through real routes (3de6a8e, re-verified PASS). MEDIUM fixed: file-wide VM fetch stub, real-DO retry idempotence (7d8786f). MEDIUM deferred (justified: guards are SQL predicates already covered; recorded on idea 01M7HC7CN5WY6GEP9G0PP4DG7B): sweep budget-saturation and answer-vs-expiry race tests, real Notification DO receipt path, live socket payload assertions, request_human_input real failure modes through /mcp
task-completion-validator ADDRESSED WARN → 2 HIGH fixed: real-DO tests for typed-message close (discriminated by removing the hook), expiry task outcome + chat-answered backstop, check-in resolution on ask; mocked hold test replaced by real SQL; task checklist updated

CodeRabbit Review Evidence (Required for agent-authored PRs)

  • CodeRabbit requested when the PR was marked ready for review
  • Waited about 15 minutes (or until a skip, rate-limit or quota reply)
  • Outcome recorded

CodeRabbit Notes

Marked ready and labelled coderabbit-review at 2026-11-16T05:18:20Z; the label workflow ran (success). CodeRabbit replied at 05:18:57Z with "Review limit reached — You've used all free OSS reviews for now" (rate limit). No review; not re-triggered (rule 25).

Exceptions (If any)

  • Scope: none
  • Rationale:
  • Expiration:

Agent Preflight (Required)

  • Preflight completed before code changes

Classification

  • external-api-change
  • cross-component-change
  • business-logic-change
  • public-surface-change
  • docs-sync-change
  • security-sensitive-change
  • ui-change
  • infra-change

External References

N/A: internal storage move; no external API changed (D1 RETURNING and json_each are already used in this codebase).

Codebase Impact Analysis

apps/api (MCP request_human_input, attention routes, inbox sweep/notice, chat list index, stalled-task classifier), packages/operations (createAsk, inbox answer, settings, Connector reads), packages/project-data (session reads, reconciliation hold, idea status, typed-message close, expiry outcome, live events), packages/worker-core (shared open-question read, schema), packages/shared (constant removed), deploy config (HUMAN_INPUT_TIMEOUT_MS removed).

Documentation & Specs

apps/www/src/content/docs/docs/guides/admin-settings.md (question settings, sweep budget), reference/api.md (inbox stores, answer outcomes, attention route ids), guides/notifications.md and reference/configuration.md (HUMAN_INPUT_*), .claude/skills/env-reference/SKILL.md, apps/api/.env.example. No specs/ edits (outside spec context).

Constitution & Risk Check

Principle XI: every new limit is an admin setting with a typed default (policy 9017df94). Risks: transition overlap with marker-era questions (both paths kept until they drain); answer delivery moves from a direct live-agent prompt to the durable prompt queue (the wake path), which is what lets a sleeping VM chat wake.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codspeed

codspeed Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing sam/implement-slice-g-inbox-d8an6x (387e213) with main (bfe2b96)2

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

  2. No successful run was found on main (5129d0f) during the generation of this report, so bfe2b96 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@simple-agent-manager
simple-agent-manager Bot marked this pull request as ready for review November 16, 2026 05:18
@simple-agent-manager simple-agent-manager Bot added the coderabbit-review Trigger CodeRabbit review for opt-in PRs label Nov 16, 2026
@raphaeltm

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@simple-agent-manager
simple-agent-manager Bot force-pushed the sam/implement-slice-g-inbox-d8an6x branch from 0c17ae1 to 63212c8 Compare November 16, 2026 06:01
@github-actions
github-actions Bot requested a deployment to staging November 16, 2026 06:02 Abandoned
@github-actions
github-actions Bot requested a deployment to staging November 16, 2026 06:08 Abandoned
simple-agent-manager Bot pushed a commit that referenced this pull request Nov 16, 2026
0246 is taken by #2772 (already applied on staging2), 0247 by #2780 and 0248 by #2781.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simple-agent-manager simple-agent-manager Bot mentioned this pull request Nov 16, 2026
31 of 35 tasks
simple-agent-manager Bot added a commit that referenced this pull request Nov 16, 2026
* feat(overview): aggregated project overview read (operation + REST route)

projectOverviewGet returns running chats and recent ideas/merged PRs for
the Inbox F1 Project Overview page; GET /api/projects/:projectId/overview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(chat): share the new-chat composer and start path

Move composer state and the Instant/task start out of useProjectChatState
into useNewChatComposer, which returns what it started and never
navigates. The chat page keeps opening the new chat; the Project Overview
task box will reuse the same start without leaving the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): Project Overview page with Running now, Budgets, Automations, Recently and a task box

New lazy-loaded page at /projects/:id/overview, first in the project nav
on desktop and phone. Running now and Recently come from the aggregated
overview read (refreshed by project socket events); Budgets reuses the
composer's usage model; Automations reuses the Automation page's model and
fix button through a new one-line AttentionLine. The task box is the real
new-chat composer and start path; sending stays on the page with a receipt
and an optimistic Running now row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(overview): task box start without navigation, budgets wording, composer collapse

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: sort test imports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(overview): Playwright visual audit; keep the idle phone task box to one row

The composer measured its height only when its text changed, so a box
first measured while its row was narrower kept a wrapped placeholder's
height. It now re-measures on width changes. While folded, attach waits
in the To row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: Project Overview guide and overview API reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: sort operations exports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(overview): review findings — waiting-on-you ranked first, phone box refolds, accessible budgets

- Running now ranks chats waiting on the viewer first and reports
  waitingOnViewerTotal, so the cap never hides the page's one exception
  ('7 more running · 2 waiting on you').
- Composer folds on an outside tap or a completed send instead of on blur
  (iOS does not focus tapped buttons); the success receipt is transient;
  receipt live regions are persistent; the text box has a name.
- Budgets tiles speak the usage left; failing automations count in red with
  a secondary Resume; compact idea rows in Recently.
- Merged PR links must be https; global profile names only for the task
  creator's own profiles.
- Performance: index for newest merged PRs (migration 0246), a lighter
  recent-ideas read (11 measured round trips), no socket refetch on a
  hidden tab, ResizeObserver work deferred to the next frame.
- Tests: nav order on desktop and phone, round-trip budget, query plan,
  automation fix, Recently links, hidden-tab, fold-after-send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: sort operations imports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* task: archive inbox F1 project overview task

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: sidebar scroll audit counts the Overview nav item

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* task: record F1 checklist and review outcomes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: renumber overview index migration to 0249

0246 is taken by #2772 (already applied on staging2), 0247 by #2780 and 0248 by #2781.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: give the GitHub sign-in prompt a painted background

The app-wide prompt in AuthProvider used bg-surface-elevated, a class no theme defines, so it
rendered transparent over whatever sat at the bottom of the page. Staging2 showed it over the
Overview task box. Use the Toast's glass-surface and shadow-dropdown. The Overview audit gains a
GitHub-reauth failed-start scene that asserts the prompt paints a background (red against the
old class).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@simple-agent-manager
simple-agent-manager Bot force-pushed the sam/implement-slice-g-inbox-d8an6x branch from b5c9fce to 3e73805 Compare November 16, 2026 09:20
@github-actions
github-actions Bot requested a deployment to staging2 November 16, 2026 09:21 Abandoned
@github-actions
github-actions Bot requested a deployment to staging2 November 16, 2026 09:55 Abandoned
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

raphaeltm and others added 4 commits November 16, 2026 10:14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce G)

request_human_input files one asks row (kind question) through createAsk; the
answer is a compare-and-set on the row plus a durable prompt with notified_at
and sweep retry; reminders, the undelivered grace and expiry run from asks in
the inbox sweep with admin settings inbox.question*. The attention routes, chat
list, ProjectData session reads, idea status, Connector reads, check-in hold
and stalled-task guard read open questions from asks. Marker-era questions keep
their ProjectData paths until they resolve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…overlay and hold tests

- question-asks.test.ts: filing, answer outcomes, concurrent answers, tenancy
  attack/owner pairs, typed-message close, sweep reminders/grace/expiry
- workers: request_human_input -> asks row -> inbox archive/answer of a
  sleeping chat queues one wake-capable delivery; marker-era overlap case
- chat list index overlay + live ranking, stall guard, check-in hold,
  Connector projection; marker-era route tests keep the overlap path
- createAsk split into inbox-ask-create-core.ts (file size rule)
- docs: admin settings inbox.question*, API reference, notifications/config

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- check-in hold lasts until the question's deadline and is released when it
  closes (no lease-cadence alarms while a question is open); gate marker
  questionHold so a release never ends a claim lease or quarantine
- typed-message close runs after the broadcast and alarm, only closes
  questions filed before the message
- getSession no longer reads D1 (no consumer renders it; list reads do)
- sweep steps get their own budget; throughput stated
- same-answer replay retries an undelivered answer
- request_human_input: empty context/options and validation errors are
  INVALID_PARAMS, not internal errors
- partial index idx_asks_open_question; expiry predicate in the ranking
  EXISTS and the Connector projection; shared chat-writer check
- HUMAN_INPUT_TIMEOUT_MS retired in the deploy-script binding test
- tests: real-SQL hold, shared reads in every mode, conjunct-isolating and
  forged-snapshot attacks, Connector lists, idea merge, real-DO typed close,
  check-in resolution, expiry outcome, authz through real routes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raphaeltm and others added 9 commits November 16, 2026 10:14
…through the sweep

- typed-message close binds the message's own timestamp
- the check-in hold covers a question just past its deadline until the sweep
  extends or expires it
- tests: file-wide VM fetch stub, real-DO retry idempotence of the answer
  notice, just-expired hold case

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Project Overview (F1) found a chat paused on a person only through
session_summaries.attention_json, which no longer carries agent questions.
Read this project's open, unexpired question asks once in a CTE and treat
either signal as paused, for the waiting state, the ranking and the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every production ProjectData object carries do_meta.projectId before an RPC
reaches it (ensureProjectId through the service memo) and reads it from memory
afterwards. The fixture never set it, so slice G's question close on a human
message re-ran the empty lookup each batch. With the production shape the
profile is unchanged from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simple-agent-manager
simple-agent-manager Bot force-pushed the sam/implement-slice-g-inbox-d8an6x branch from 4976031 to 387e213 Compare November 16, 2026 10:22
@simple-agent-manager
simple-agent-manager Bot merged commit 26aaacd into main Nov 16, 2026
36 checks passed
@simple-agent-manager
simple-agent-manager Bot deleted the sam/implement-slice-g-inbox-d8an6x branch November 16, 2026 10:58
@simple-agent-manager simple-agent-manager Bot mentioned this pull request Nov 16, 2026
15 of 22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coderabbit-review Trigger CodeRabbit review for opt-in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant