Repository navigation
M3: merge main into selfhost integration - #2817
simple-agent-manager[bot] merged 77 commits into
Conversation
…nt-compute-catalog-8nh1yj
…nt-compute-catalog-8nh1yj
Replace only clear.click() with clear.tap() after the CDP touch gesture. Retain assertions, four viewport projects, timeouts and zero retries. Repeated failure on281da79: https://github.com/raphaeltm/simple-agent-manager/actions/runs/43647857485/job/132609602580 Repeated same failure on4a8e7959: https://github.com/raphaeltm/simple-agent-manager/actions/runs/43651116541/job/132619651688 Coordinator preaccepted this exact one-line change if the new candidate failed at the same action (events1a8d26f4 and6cf45614). Draft/final-SHA review and all CI/staging gates remain.
…s byte-identical ubuntu-latest moved to ubuntu-26.04 on 2026-11-14. The cgo-enabled native amd64 vm-agent build then produced different bytes for the unchanged release ba3ba01, and publish-vm-agent-artifacts.sh refused to overwrite the immutable artifact, failing every staging (run 43655924997, two attempts) and production deploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b39c0a3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit a0f07c6)
Playwright cannot install Chromium on ubuntu-26.04 ('Playwright does not support chromium on
ubuntu26.04-x64'), so the staging smoke tests failed after a successful deploy (run 43657273196)
and the CI Playwright jobs and installer deploy would fail the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 74877d4)
* feat(insights): store lifecycle phase timings (slice T) Add lifecycle_phase_timings (migration 0250). recordLifecycleTimings and recordRunnerPhase now store one row per phase as well as logging, in one D1 round trip, resolving task, skill and profile inside the INSERT. The daily lifecycle latency evaluation purges rows with lifecycleLatency.retentionDays. Shared reads phaseDurationStats and listPhaseTimings live in packages/operations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: archive insights slice T task file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(insights): index-backed task lookup, off-path runner writes, isolated purges Review fixes for slice T: - The INSERT finds the task by primary key or idx_tasks_workspace_id instead of walking the project's tasks per phase row; EXPLAIN QUERY PLAN test. - TaskRunner hands phase writes to ctx.waitUntil, values captured at call time, so telemetry never sits between a step's state writes. - Each daily purge is isolated and reports null on failure. - lifecycle_phase_timings joins the deploy churning-tables list. - Plain INTEGER PRIMARY KEY (no sqlite_sequence write per insert). - Route test: a failed store still returns 200. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: revert unrelated formatting in task-runner files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(insights): max phase list within bind limit; clarify best-effort and window docs 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>
…odex hook config validated (#2790) * task: add agent-tooling-self-enforcement (active) * feat(agents): Codex hook delivers path-scoped rules on file access (experiment) * feat(agents): Stop test-quality gate rewritten and enabled for Claude Code and Codex; Codex hook validation * feat(agents): rule 73 becomes a blocking Go check and leaves launch context * fix(agents): backtick wildcard scopes in the generated rule index * docs(quality): document the Stop gate, Codex rule delivery and the rule-73 check * chore(quality): strict index access in new agent tooling * chore: task status, CI guard for the rule-73 step, Stop gate scope notes * fix(agents): track .codex/hooks; --check judges hook scripts and generated files by what git can see * fix(quality): rule-73 checker covers the variants a Go review found (opts[i], receivers, generics, load-then-modify, truthiness forms, switch, anchored opt-out) * refactor(quality): split guard classification out of check.go (file size limit) * fix(agents): harden both hooks (input caps, fail-open state, regular files only, validated rule paths, quoted paths) and close Stop-gate test gaps * chore(agents): ship Codex hook-config validation only; rule-delivery hook moves to sam/codex-rule-delivery-hook (Codex sessions in SAM do not run repository hooks) * chore(deps): Dependabot covers the go-optional-fields module * task: archive agent-tooling-self-enforcement --------- Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com>
Bumps [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) from 1.0.269 to 1.0.275. - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](anthropics/claude-code-action@61a9c27...4d75e5f) --- updated-dependencies: - dependency-name: anthropics/claude-code-action dependency-version: 1.0.275 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…hropics/claude-code-action-1.0.275 chore(deps): bump anthropics/claude-code-action from 1.0.269 to 1.0.275
* chore(deps-dev): bump @playwright/test from 1.62.1 to 1.65.0 Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.62.1 to 1.65.0. - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](microsoft/playwright@v1.62.1...v1.65.0) --- updated-dependencies: - dependency-name: "@playwright/test" dependency-version: 1.65.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): align staging Playwright and keep lock update focused --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com>
* task: add insights run receipt (slice R)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(insights): run receipt operation, REST route and ProjectData facts (slice R)
Adds runReceipt in packages/operations (catalog operation sam_run_receipt) and
GET /api/projects/:projectId/tasks/:taskId/receipt: phases, outcome, account,
resources, tool calls by kind, and what slowed the run down, derived at read
time from records SAM already keeps. One bounded ProjectData RPC aggregates tool
calls and agent questions in SQLite. Project scope is in every SQL predicate,
foreign and missing tasks share one not-found, and the read stays within 7 round
trips. Tokens are not_reported and CI first-try not_recorded: never estimated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(web): Receipt tool in the chat rail for task-backed runs (slice R)
A Receipt tool in the session tool rail opens the Run receipt as a side panel
(desktop) or a full sheet (phone): outcome, where the time went, stat tiles,
the CPU line with tool-call markers from the existing per-minute resource
rollups, and what slowed the run down. TanStack Query with stale-while-
revalidate; a live run refreshes on RUN_RECEIPT_POLL_MS, a finished one does
not. Playwright audit at 375 and 1280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: Run receipt in the chat tool rail guide
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: sort operations exports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): address receipt review findings
- Ask titles follow the inbox's assignee visibility; waiting time still counts.
- Index comparable-run lookups (migration 0251) and cap before the event
lookups; EXPLAIN QUERY PLAN test at 3k tasks.
- One-pass ProjectData scan bounded by messages read; status-event times via
julianday(); asks newest-first; date-prefix window bound.
- One task-id source for rail and drawer; disclose the question cap.
- UI: CPU loading/error states, retry feedback, accessible PR link, CPU legend,
light theme and scrolled mobile captures; route and drawer tests.
- Split the receipt reads into insights-receipt-reads.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: renumber receipt comparison indexes to migration 0252
Slice F already uses 0251 (pull_request_heads).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): keep receipt DO scan payload-free and bound asks to the run
The materialized message window now holds only each message's kind and call
id, never its tool metadata, so memory does not grow with payload size. Asks
are read inside the run's own time window. Adds the profile-index plan test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): address CodeRabbit review on the run receipt
- Scope the account's ACP sessions to the run's window.
- Read one ask past the cap and disclose a cut-off list; the ask cap now
comes from insights.receiptWaitingMaxQuestions.
- When the ProjectData read fails, waiting is a disclosed floor ('waiting'
unavailable), never an exact zero.
- A live run with an open question is measured up to now.
- Single-column stat tiles below 360px; pinned clock in the receipt tests.
- Sort apps/web api exports after the main merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* style: format receipt files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): read a zero wait as 0s in the run receipt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* task: archive insights run receipt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(connector): count sam_run_receipt in the Workers catalog check
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>
* feat(mcp): per-policy inject mode and size budgets for get_instructions Every policy gets an inject mode: pinned (default for every existing and new policy, always injected in full) or on_demand (listed by title and id, full text only when relevant to the task, inside a budget). Knowledge gets a size budget after its ranking; a total guard trims only discretionary content and never pinned policies. Adds Phase 0 size telemetry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(web): pin or unpin policies from Agent context, with session size Policies tab gets a phone-usable Pinned / On demand control per policy and a summary of the characters pinned policies add to every agent session, both measured with the API's own line renderer. Refetches no longer unmount the tab (rule 48). Adds the vertical slice through /mcp and the real ProjectData DO, unit tests for ranking (rule 65), the knowledge budget and the total guard, the DO migration test, docs, and the Playwright audit scenarios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: address local review findings for inject mode and budgets - Clamp budget settings to their registry range; out-of-range falls back to the default (a min relevance of 0 would show every on-demand policy). - Over-budget note says what is true: every pinned policy in full, knowledge and on-demand text keep their own budgets. - Bounded trim passes instead of a cliff to the floor. - DO-side injectMode guard on create and update. - Tests for size/warn logs, budget-pass fallback, on-demand trim and floor. - UI: honest copy for inactive/expired policies, only text dimmed, aria-disabled keeps focus, accepted mode survives a failed refetch, per-project key reset, solid selected state with a check icon. - Refetch-identity test held mid-flight with a deferred promise. - Docs: rollback and over-budget wording, settings row, idea title in relevance text; revert unrelated list renumbering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * revert(mcp): keep the CI-wait guidance in get_instructions mcp-ci-wait-guidance.test.ts requires the event types, full head SHA and reconcile timing in both entry points. That guard predates this change and the trim saved ~550 characters, so the paragraph stays as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(mcp): total guard sends only the required floor when that alone is over budget Staging2 showed the old over-budget branch was not monotonic: at a 40K total the payload was 72.8K, larger than the 59.8K at 60K, because knowledge and on-demand text kept their own budgets on top of an over-budget floor. Now the floor (every pinned policy in full, the task, the indexes) is sent alone with a note. Default total raised to 120,000 so a project whose policies are all pinned (SAM, ~101K) keeps its ranked knowledge at deploy; ~48,000 gives inline delivery in Claude Code, which saves results over ~50,000 characters to a file (59,820 spilled). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: archive get_instructions inject mode and budgets 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>
* feat(insights): projectFlow read and pull request head record (slice F) Adds the shared projectFlow operation behind GET /api/projects/:projectId/insights/flow and the additive pull_request_heads table plus pull_request_checks.first_failed_at that make CI first try and flaky checks derivable at read time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(web): Insights page with Flow tab and Overview This week pane (slice F) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(insights): visual audit, format tests and public docs (slice F) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(insights): address review findings (slice F) - from_open is set only from GitHub's opened event (exact, never inferred) - late check results for a PR's opening commit are kept after a push - pull_request_heads cascades with its project - idea evidence reads use one json_each statement each (no 96-id chunking) - round-trip budget and webhook-ingest vertical slice tests - UI: no cross-project placeholder data, amber only for waiting-on-you, refresh indicator in the header, chart summary line, mobile range size - docs: API reference entry and wording corrections Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(insights): archive slice F task file; format api index Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(insights): no type-argument narrowing of D1 rows in the batch fallback Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(web): project nav has 14 items with Insights Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: retrigger (synchronize event for 600093a was not delivered) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(insights): ideas waiting longest lists ideas a person filed Automation- and incident-filed ideas are folded away on the Ideas list; on staging they filled the whole list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: backlog staging Claude MCP tool call never sent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(insights): CI tile does not claim checks are running when none reported Staging found a pull request on a repository with no CI: it stays undecided because no check ever reports, and the tile said "Waiting on CI, 1 pull requests still running checks". Say no result yet instead, which is true for both pending checks and no checks, and fix the plural. 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>
Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): bring the Tools page up to date The Tools page marked the SAM Connector and GitHub App as "coming soon" although both ship, listed a self-hosted runner that does not exist, and had no MCP servers entry. Every card now links to where the tool is set up; the Connector card hides when the installation turns it off. The CLI page's quick start used a pasted session cookie and the maintainer's production API URL. It now matches the CLI guide: browser sign-in against this installation's API, project selection, chats and tasks, plus the API-token route for scripts. Its version fetch moves to TanStack Query. The CLI guide no longer tells readers to ignore it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(web): show the Connector card only once it is confirmed on 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>
* task: add staging-lease-fair-queue Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): give the staging lease a fair queue Reservations are append-only deployment records written by a new queue job outside any concurrency group, so no later dispatch can cancel a waiting agent's place. Only a branch that holds the lease or whose turn it is reaches the serialized lease job. At release or expiry the head of the queue gets a configurable grace period, then the next entry; a releasing holder queues behind existing waiters; reservations expire. Records are version 2, which older workflow copies refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): address lease queue review findings - An expired holder's reservation is no longer dropped, so it can take the slot again or queue behind waiters. - A release enters the serialized group only when the branch holds the lease or is queued, and the lease job uses its own group (staging-lease-<installation>), so stray releases and older workflow copies cannot displace an entitled pending run. - The lease job honours the turn the queue job saw (bounded to three grace periods), so a runner or group wait cannot cost the head its turn. - History is read across up to five pages before failing closed. - status parses string payloads for the recorded grace period. - Docs: release only after your own deploy run finished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): address CodeRabbit review of the lease queue - A reservation made after the branch's old one expired goes to the back. - A missed head that reserves again is placed by when it reserved, ahead of later reservations. - When a waiter ahead leaves, every remaining entry keeps the end of the turn it was told (promisedEnd), so a sleeping agent cannot miss it. - Snapshots keep recently missed entries for the admission slack, so a delayed lease job can still prove the turn it was let through on. - Reservations record the grace period, so status is right before the first snapshot. - Docs: release comes after every live check; rule 13 states the early-release turn window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(staging): keep root rule 13 within the launch context budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): never write a queue record over a live pre-queue lease A workflow copy from before the queue refuses any version-2 record, so a reservation written over its live lease locks it out of renewing or releasing. While the holder's record is version 1, the queue job writes nothing and tells the caller to wake at the legacy expiry. 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>
* feat(inbox): agent inbox tools inbox_read/inbox_write over shared operations (slice D) Adds fileAgentAsk/fileAgentReview/updateAgentAsk/cancelAgentAsk/listAgentAsks/getAgentAsk in packages/operations, the worker port (announce, withdraw, link checks), the MCP member tools and domain groups, and makes request_human_input an alias of a blocking ask through the same operation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(inbox): turn-end instruction, inbox_write chat card, blocking-only paused readers - get_instructions carries one inbox paragraph for task-backed sessions; server instructions, request_human_input description and onboarding text point at inbox_read/inbox_write - chat card InboxItemCard for inbox_write ask/review (shared typed-card list, compact matcher) - readers meaning 'chat paused on a person' and the chat-message close only count blocking asks - review notice wording Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): agent inbox operations on real SQL, tenancy attacks with owner controls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): capability through /mcp per method, inbox_write card render and cross-harness Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(inbox): what agents file, inbox_write/inbox_read in tool tables, new admin settings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(web): inbox item card polish and Playwright audit at 375/1280 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style: import order and formatting in inbox agent operations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(inbox): review findings for slice D - inbox_read and the similar-items check only see items addressed to the caller's person - pr links pinned to the project's repository host and a numbered pull/merge request path - reconciliation check-in hold and connector count ignore non-blocking asks - similar scan reads at most inbox.similarScanMax rows; chat list uses the chat index; preview lookup keeps the primary key; idempotency key capped at 120 characters - card: receipt is a mounted live region that takes focus, error copy by status, unique 'Open in inbox' label and 44px mobile target, stronger title Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D status and remaining work Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: keep agents.md account list numbering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(inbox): inbox tools need a task-backed session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): compact history keeps only the inbox_write item reference Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): cross-user isolation (proven discriminating) and pull request host pinning Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): non-blocking asks do not pause a chat in the overview or chat index (discriminating) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): request_human_input alias keeps title, schedule, live chat update and push Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): get_instructions carries the inbox paragraph once in task and conversation mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): non-blocking asks and reviews outlive the expiry sweep; blocking asks expire Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): SAM's check-in is not held by a non-blocking ask (discriminating) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: slice D progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(inbox): share the inbox capability harness between slice A/G and slice D tests Removes the duplicated seed and route helpers SonarCloud flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(inbox): import order in MCP registries; card test follows the unique link name, covers a server error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: re-run checks on the rebased head Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: backlog bug found on staging (task fails after three placement refusals) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: archive inbox slice D (staging verified) 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>
* docs(www): journal post on the Inbox One list of every open ask (questions, permission requests, secrets, approvals) built from one UNION ALL read over the stores each ask lives in, with UI renders of the quick view and a phone item view, and the X card for sharing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(www): address accuracy review on the Inbox journal post Permission requests come from a synced index, so the post no longer claims the Inbox involves no copies; the phone render now uses the shape a real request_human_input question has (no links, no free text); and the answer-race, badge, tier, archive and pagination wording now match the code. Files a backlog task for the Inbox guide describing review asks that nothing creates yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(www): keep the Inbox X card lossless Palette compression dithered the gradient; restore the original Chromium render (the same file uploaded to the library). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(www): qualify badge and pagination claims in the Inbox post 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>
…2809) * task: add staging-lease-fair-queue Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): give the staging lease a fair queue Reservations are append-only deployment records written by a new queue job outside any concurrency group, so no later dispatch can cancel a waiting agent's place. Only a branch that holds the lease or whose turn it is reaches the serialized lease job. At release or expiry the head of the queue gets a configurable grace period, then the next entry; a releasing holder queues behind existing waiters; reservations expire. Records are version 2, which older workflow copies refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): address lease queue review findings - An expired holder's reservation is no longer dropped, so it can take the slot again or queue behind waiters. - A release enters the serialized group only when the branch holds the lease or is queued, and the lease job uses its own group (staging-lease-<installation>), so stray releases and older workflow copies cannot displace an entitled pending run. - The lease job honours the turn the queue job saw (bounded to three grace periods), so a runner or group wait cannot cost the head its turn. - History is read across up to five pages before failing closed. - status parses string payloads for the recorded grace period. - Docs: release only after your own deploy run finished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): address CodeRabbit review of the lease queue - A reservation made after the branch's old one expired goes to the back. - A missed head that reserves again is placed by when it reserved, ahead of later reservations. - When a waiter ahead leaves, every remaining entry keeps the end of the turn it was told (promisedEnd), so a sleeping agent cannot miss it. - Snapshots keep recently missed entries for the admission slack, so a delayed lease job can still prove the turn it was let through on. - Reservations record the grace period, so status is right before the first snapshot. - Docs: release comes after every live check; rule 13 states the early-release turn window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(staging): keep root rule 13 within the launch context budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): never write a queue record over a live pre-queue lease A workflow copy from before the queue refuses any version-2 record, so a reservation written over its live lease locks it out of renewing or releasing. While the holder's record is version 1, the queue job writes nothing and tells the caller to wake at the legacy expiry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): keep branches with new Durable Object migrations off primary staging Durable Object migrations only move forward, so a branch that deploys a migration tag main lacks blocks every main-based branch on that installation until it merges. deploy-staging.yml now refuses such deploys on primary staging before a place is reserved, and tells the agent to use staging2. The comparison reads apps/api/wrangler.toml on the branch and on origin/main, and fails closed when it cannot read every tag. Documents the clean-up duty: tear staging2 down and redeploy main before releasing if the branch has not merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(staging): exercise the migration guard's git path; tie it to the deploy condition Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staging): run git by absolute path in the migration guard on runners 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>
…-outbound-fetch lint (#2751) * feat(api): guard user-chosen outbound URLs (L5a: classifyHost, guardedFetch) Port of the outbound-fetch guard from sam/selfhost-pass-2 (landing slice L5a): - worker-core network-hosts: classifyHost (public/private/forbidden, every IPv4/IPv6 literal spelling) and guardedFetch (host check before the request, manual redirects, each hop re-checked, cross-origin header allowlist, one deadline) - admin setting outbound.maxRedirects (default 3) - web push: endpoints must be public hosts at save; stored rows re-checked at delivery (skip + web_push.endpoint_refused, no URL in the log) - composable credentials: base URL must be HTTPS on a public host at save; a stored private/metadata base URL is skipped and logged in resolveProxyUpstream - agent sign-in issuer keys fetched through guardedFetch (no redirects) - check_dns_status in its own module: same-origin hops only, fixed error categories - deployment-release image resolver uses the shared classifier (OCI helpers split out) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(api): outbound guard through its real callers (L5a) Classifier and guardedFetch suites; push send and save; credential save and use-time skip through the real passthrough route (9 refusals proven red against main's isHttpsUrl); JWKS fetch through the real agent sign-in route; check_dns_status; image resolver cases the old local blocklist accepted (7 proven red against main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(quality): sam/no-unguarded-outbound-fetch lint rule with a per-file ratchet (F6) Replaces the integration branch's regex/AST inventory of fetch call sites (finding F6) with an ESLint rule over apps/api/src and every package the Worker bundles. It matches every value reference to the global fetch ((0,fetch), Reflect.apply, fetch.call, globalThis/self.fetch, fetch passed as a value) and cloudflare:sockets imports. Stage: ratchet. 44 pre-existing sites in 32 files are held by outbound-fetch-baseline.json; a new unacknowledged site fails lint, and a file whose count drops must lower its baseline. Sites guarded in this change are acknowledged inline with the reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: outbound requests to user-chosen URLs; L5a task file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: address L5a review findings - lint rule: acknowledge only directives that list the rule id; catch destructured and Reflect.get aliases of the global fetch - outbound.maxRedirects: an unreadable setting refuses every redirect (0) instead of the default - check_dns_status keeps httpStatus on a refused redirect - remove guardedFetch's unused deadline option; un-export internal classify helpers - tests: push DO save refusal and stored private row through the DO fan-out, PATCH of a configuration base URL, skip-then-next-candidate in resolveProxyUpstream - docs: passthrough per-hop gap stated; admin-settings guide mentions outbound.maxRedirects Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(api): fold the private base URL cases into the passthrough suite (no duplicated mocks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: L5a staging recipe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * task: L5a staging2 evidence; backlog for misleading node-create offering message 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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
UI audit evidence: shared composer preserves self-host Instant/profile capability after main extraction. Six focused suites/127 tests pass; complete Playwright audits19 pass,1 intentional desktop skip for phone-only flow. The UI specialist opened and reviewed all six images: no clipping, overlap or viewport regression; long input scrolls internally and controls remain visible. Screenshots stored permanently in SAM project library |
Merging this PR will not alter performance
Comparing Footnotes
|
|
|
Coordinator review (self-host coordinator, task 01M7JMXS2JRW6QQMB1356ENPM3): checked the merge parents (9286831 integration / 7266055 main) and the post-merge commits (fixture alignment with main's fail-closed redirect settings, outbound-fetch inventory test + analyzer deleted now that the lint rule replaces them, integration-branch-only ci.yml hosted-git filter/aggregate). Full CI 43936073442 passed on 0a4a544, the box upgrade + agent smoke passed and were cleaned up, and the specialist table is PASS/ADDRESSED. CodeRabbit: requested 20:20:58Z, answered "Review skipped: auto reviews are disabled", recorded per the CodeRabbit rule. Merging into sam/selfhost-pass-2 with a merge commit, as for #2758. |
faa02a8
into
sam/selfhost-pass-2



Summary
M3 merges main
726605541f01cbf8ca9e20f14bddf5f0e25115c6into integration9286831418dadd5db12ad68a36ffd3d44446beaf(after #2764). Real merge, PR base sam/selfhost-pass-2, no rebase/cherry-picks. Do not merge: coordinator task 01M7JMXS2JRW6QQMB1356ENPM3 reviews and merges. Model: M2 #2758, M1 #2736.6c7d5deb0687b3034d74da3f6d8e4e84298fb0259286831418dadd5db12ad68a36ffd3d44446beaf(integration)726605541f01cbf8ca9e20f14bddf5f0e25115c6(main; L5a L5a: outbound-fetch guard (classifyHost, guardedFetch) + no-unguarded-outbound-fetch lint #2751)git diff --shortstat origin/main...<head>):0a4a5444f23de754cdbd7dd1d7978444f230109f: 855 files, +84286 / -2124 (includes CI routing/gate compatibility and task evidence).Conflict table
.github/workflows/ci.ymlapps/api/src/lib/web-push.tsapps/api/src/routes/ai-proxy-passthrough-upstream.tsapps/api/src/routes/mcp/check-dns-status.tsapps/api/src/services/admin-settings-outbound-definitions.tsapps/api/src/services/admin-settings-registry.tsapps/api/src/services/agent-sign-in/verify.tsapps/api/src/services/build-context-upload.tsapps/api/src/services/jwt.tsapps/api/src/services/outbound-fetch-settings.tsapps/api/tests/unit/lib/guarded-fetch-redirect-policy.test.tsapps/api/tests/unit/lib/network-hosts.test.tsapps/api/tests/unit/routes/composable-credentials.test.tsapps/api/tests/unit/routes/deployment-environment-observability.test.tsapps/api/tests/unit/routes/deployment-membership-auth.test.tsapps/api/tests/unit/routes/mcp-check-dns-status.test.tsapps/web/src/lib/query-stale-times.tsapps/web/src/pages/project-chat/useProjectChatState.tsapps/www/src/content/docs/docs/architecture/security.mdeslint.config.mjspackages/app-deployment/src/image-resolver-outbound.tspackages/worker-core/src/index.tspackages/worker-core/src/network-hosts/classify.tspackages/worker-core/src/network-hosts/guarded-fetch.tspackages/worker-core/src/network-hosts/index.tsscripts/quality/runtime-tunables-baseline.jsonSilent breakages found and fixed
Outbound fetch inventory
Deleted old regex/AST inventory test and its now-unused allowlists/analyzer. Regenerated via
node packages/eslint-plugin-sam/scripts/outbound-fetch-baseline.mjs --write: 28 files,36 sites, only decreases from main; no new baseline debt.Every branch-added global site:
selfhost/runtime-secrets.ts:fetchSecretsservices/github-app-manifest.ts:completeGitHubAppManifestservices/hosted-git/backend.ts:artifactsRemoteFetch(global reference and fallback call)services/llm-chat-target.ts:fetchChatTargetpackages/agent-email/src/smtp-client.tssocket importservices/hosted-git/import.ts:cappedFetchservices/gitlab-login-provider.ts:fetchGitLabUserInfopackages/repo-hosting/src/gitlab.ts:gitlabFetchservices/speech-endpoints.ts:sendDO binding fetches (
HostedGitRepoinit/delete/info, hosted HTTP stub), in-processapp.fetchand ASSETS binding fetch are service calls, not global outbound requests; lint distinguishes these.UI Screenshot Evidence
Playwright screenshots and specialist quality review: permanent screenshot evidence.
Surface: New Chat shared composer
Surface: Project Overview shared composer
Migration audit
selfhost-hosted-git-v1; sync-wrangler-config and selfhost generator collision checks agree.0232_node_reverse_tunnel_leases.sqlstays unique; observability/0002 remains unique in its separate database.Checks run
pnpm lint:22/22 pass (SAM outbound rule included);pnpm selfhost:test:38 files,582 pass,2 skip.pnpm test:39/39 tasks pass; API1131 files17101 pass,4 skipped; web429 files5360 pass; project-data53 files549 pass; app-deployment14 files190 pass.0a4a5444f23de754cdbd7dd1d7978444f230109f. All7 Workers shards, aggregate gate,3 API shards,2 web shards, packages, hosted-git, build/typecheck, lint, deploy checks, Go/VM/CLI, volume mount and workspace quality passed. SonarCloud and CodSpeed also passed.Staging Verification Evidence
Explicit user exception: integration merge PR, no staging deploy and no merge to main. Coordinator granted exclusive selfhost box. Upgrade from4809b097b to6860e5e95 passed with D1 migrations,3998-object backup and6s delta-copy downtime. Worker cfb46b4551a5c5e4, sealed bundlee46cd268 unchanged,7 services running. Agent-test workload sign-in succeeds. Real end-to-end task passed: workload user xw6b9p2gmYK2gXGYvP1il7nLPAWIgRkt submitted task
01M7JV47BE61YA0GSTB2D6S573; a GCP VM provisioned, delivered heartbeat at18:52:19Z, agent received prompt at18:54:24.876Z and returned pong at18:54:28.298Z. Sessionfecd7a45-2814-4af4-a103-05fdae25d121stopped, workspace/node/profile deleted; API nodes/workspaces empty and cloud inventory confirmed only sam-box. Signed out200. Temporary SSH key/user/firewall, secret-bearing backup/log and local credentials removed. Box released on feature.selfhost-landing. Subsequent PR commits change only tests, CI and task notes; application runtime source is byte-identical to deployed6860e5e95 (checked git diff over API/package sources and selfhost scripts/config).Specialist Review Evidence
CodeRabbit Review Evidence
Requested via
coderabbit-reviewlabel at20:20:58Z after exact-head CI passed. CodeRabbit responded at20:21:18Z: Review skipped — auto reviews are disabled on this repository (response); bounded wait ended immediately per repository rule. Trusted request workflow43948843962 subsequently failedPR is not openbecause the coordinator merged at20:22:42Z before its queued job resolved the PR. No retry/waiver. Coordinator review and merge recorded here; integration merge commitfaa02a842dacdedb476059f37eabd043ae7c128c. M3 executor did not merge.Agent Preflight (Required)
Classification
External References
N/A: merge of reviewed repository implementations; no new external API integration. M2 #2758 read before merge.
Codebase Impact Analysis
Canonical
packages/worker-core/src/network-hosts->apps/api/srcpush/credentials/sign-in/DNS,packages/repo-hostingandpackages/app-deploymentimage resolver. Branch capability -> shared composer -> profile runtime; publish callback -> jwt-verify -> generation guard; worker publish-job spec -> shared S3 target -> operator object store.Documentation & Specs
Merged main docs and corrected security GitLab citation. Task contains audit and acceptance criteria. No new product contract.
Constitution & Risk Check
Principles X/XI: preserve existing interfaces through small adapters, use existing settings. Migration safety: no renumbering/deletion of applied SQL; DO tags checked. Main landed versions replace duplicate branch implementations. Primary risk is silent merge compatibility, covered by targeted and broad validation.