Skip to content

feat(compute): add Lambda MicroVM P3 approval lifecycle - #904

Merged
krokoko merged 196 commits into
aws-samples:mainfrom
isadeks:feat/645-microvm-p3
Nov 18, 2026
Merged

krokoko merged 196 commits into
aws-samples:mainfrom
isadeks:feat/645-microvm-p3

Conversation

@isadeks

@isadeks isadeks commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Implements ADR-021 P3 for the lambda-microvm backend (#645): a task waiting at a Cedar approval gate suspends its MicroVM, so it stops billing for compute, and resumes on the decision with memory and disk intact. Follows P1 (#689) and P2 (#733).

Scope was cut back to the original P3 in ADR-021 sub-decision 2. The PR is now 150 files (133 excluding generated Starlight mirrors), down from 317. Everything else that had accumulated here now waits for its own issue and PR (see Split out).

What P3 adds

  • ComputeStrategy.suspendSession / resumeSession, mandatory on all three strategies. AgentCore and ECS return unsupported.
  • Orchestrator-owned suspend policy. The VM suspends after a grace period (microvm_sleep_after_s, default 60 s), and only if it can still wake 60 s before the gate's deadline. A per-task --microvm-sleep-after <s|off> overrides this, and an SSM switch can turn suspension off for the whole deployment.
  • Inline best-effort resume in the approve/deny Lambdas, with orchestrator-poll reconciliation and a microvm_resume_orphan event.
  • Timeout under freeze. A gate expires at min(monotonic budget, created_at + timeout_s), so a frozen VM can't stretch the window.
  • Agent /suspend and /resume hooks. They flush progress, reseed the CSPRNG, and refresh task credentials after waking.
    • An unsafe /suspend answers 200 declined: any non-200 makes the service terminate the VM, which was verified live. The resume after a decline answers 200 not-suspended.
  • Image lifecycle-capability check. Legacy images that can't sleep keep running and can still be recovered.
  • Nested MicroVM layout (microvm_nested_stack) and the ConcurrencyMaintenance nested stack. Synth throws unless microvm_nested_stack is set explicitly. Without the nested stacks, some census profiles exceed the 490-resource budget.
  • Approval default stays at main's bounded 300 s (ceiling 3600 s). With the 60 s sleep-after default, a default gate suspends at about 60 s and wakes at about 240 s.
  • Docs: fix(compute): Lambda MicroVMs P2 review follow-ups (#733) — classifier ordering, payload-delete grant, ARN pinning, stale claims, N1 test #817 item 4 (retracted claims about snapshot region and heartbeat) corrected here.

Split out (each needs its own approved issue)

Bootstrap

This PR moves the bundle to 1.11.0, because main's 1.7.0 and 1.8.0 collided with this branch's own numbering; version.ts records each step. Re-bootstrap before deploying.

Verification

  • CI is green: build (agentcore), the security scan, dead-code detection and PR title.
  • Locally: CDK 6,430, agent 1,958, CLI 1,093 and DynamoDB Local all pass, plus census, drift and the docs build.
  • Live, on a nested dev deployment (merged main, bootstrap 1.11.0, SDK 0.2.168 / CLI 2.1.301):
    • all 8 scenarios in scripts/microvm-acceptance.sh pass: normal, approve and deny after sleep, defaults (300/60, no overrides), expiry while asleep (timed out at exactly created_at + 300 s; the gated write never ran), cancel while suspended, declined suspend, and a 3-task burst;
    • stress: 45 tasks in 3 rounds, over the per-user cap of 10. 44 of 45 behaved as intended; the cap held at 10; there were no seat or VM leaks and no Lambda errors. The single failure was an AWS-side launch fault (no guest logs) that didn't recur.
    • Timing races (approve at the suspend moment, during resume, at 285 of 300 s, two approvals at once, approve and cancel together): each approved action ran exactly once, and none ran on deny, expiry or cancel-first.
    • Workspace state survived a suspend (dependencies, an uncommitted edit, tests passing after wake). A session-scoped approval carried across a suspend/resume. A nudge sent during suspension was delivered after the wake. Task-level and deployment-level sleep-off both worked.
    • Entry points: CLI, Linear (label trigger, gated approve/expiry, cancel, @bgagent iterate), signed webhooks (a tampered body is rejected with 401), and attachments (inline text and image, plus a 719 KB presigned upload).
    • AgentCore regression: normal, gated approve, and cancel while awaiting approval all behaved correctly.
  • Not covered: sleeping past credential lifetime. Built-in gates cap at 600 s, and the custom rules that would allow longer waits have a separate main bug, now fixed on its own branch. The renewal mechanism passes all 7 synthetic probe modes.

Deploy notes

  • Re-bootstrap to 1.11.0.
  • Drain in-flight tasks before upgrading a stack that ran an earlier feat(compute): add Lambda MicroVM P3 approval lifecycle #904 build (the coordinator/image contract changed).
  • Keep IAM role descriptions unchanged. The least-privilege bootstrap has no iam:UpdateRoleDescription, so a changed description fails both the deploy and its rollback.

Grant only the exact execution role to CloudFormation. Correct recursive policy hashing and include the generated inline policy; bump bundle to 1.7.0.
…ands"

This reverts commit 62cce37d8f942560be2bbee08e2a046acfb0fd8d.
The least-privilege bootstrap has no iam:UpdateRoleDescription, so a changed
description fails an existing flat stack's upgrade and its rollback. The
text is main's again, and a test pins it.
MicrovmPassRoles admitted only backgroundagent-dev's nested build and
connector-operator roles, so a supported name such as
backgroundagent-dev-team-b could not pass its own. The grant now covers
the default and suffixed stack names, the scope the rest of the bundle
uses; the execution role stays excluded. Bundle 1.11.0 -> 1.12.0.
The packaging script's instructions named bundles 1.8.0 and 1.9.0. They
now read cdk/bootstrap/BOOTSTRAP_VERSION, the version preflight checks.
Rows carried deadline_epoch but no ttl, so they and their tool-input
previews never expired. ttl is the deadline plus the cleanup margin, the
retention main had.
The identity check rejected the next task in a reused local agent server.
A task's session is now released when its background run ends, so the
next task builds its own; a running task still cannot change identity.
…_started once

The start step never retries, so a transient error recording FAILED left
the task HYDRATING and its seat held until the stranded sweep. The step
still tries the write, then a separate retried step records it without
another launch.

session_started could be skipped when the guest marked the task RUNNING
before the coordinator's read. For MicroVM tasks it is now its own durable
step after the start, whichever writer registered the worker.
…ng undefined

Main's silent-success-masking scan rejects a catch that returns an empty
default. The lookup now returns found, missing or unavailable; the
supervisor still treats unavailable as unknown.
@krokoko
krokoko self-requested a review November 18, 2026 22:32
@krokoko
krokoko enabled auto-merge November 18, 2026 22:36
@krokoko
krokoko added this pull request to the merge queue Nov 18, 2026
Merged via the queue into aws-samples:main with commit e4fbf8a Nov 18, 2026
4 checks passed
krokoko pushed a commit that referenced this pull request Nov 19, 2026
- When the agent itself changed a task's status (finished it, failed it,
  or paused it to ask for an approval), it left the task's updated_at
  time untouched, so the API kept returning the moment the task had
  started to run. A task that failed after three hours was listed under
  'Needs you' on the console's Overview as updated '3h ago', a
  repository whose last task had just finished showed its last activity
  as '3h ago', and tasks left the 'Done (24h)' and 'Failed (24h)'
  counters hours too early. The agent now sets updated_at together with
  the status, as every status change made by the rest of the platform
  already does. One status change is not covered yet: the return to
  RUNNING after an approval, because open pull request #904 rewrites
  that same statement.
  Gain: Bug fixed for every reader of updated_at: the console's
  'Updated' column, a repository's last activity, the 'Done (24h)' and
  'Failed (24h)' counters, the recent-failure flag and the API field now
  show when a task finished or paused, not when it started. Until now
  the value was wrong by the task's whole running time, up to 8 hours; a
  task waiting for an approval now shows how long it has waited. About
  15 lines of agent code, and the guide's example of a completed task
  shows the corrected value.

- The user guide said that every task record has a logs_url field with a
  direct link to its CloudWatch logs, and that it can be read from the
  task status output or from the API. Nothing ever returned that field:
  not the API, the CLI or the web console. The agent stored the link in
  the database only in the rare case where its own RUNNING write came
  before the orchestrator's, and no code read it. The guide now gives
  only the instruction that works (open the log group and filter by task
  id), and the agent no longer builds or stores the link.
  Gain: The guide stops promising a field that never arrives. 62 lines
  removed and 18 added: 20 lines of agent code and the five tests of the
  deleted link builder are gone, one small test stays to show that the
  attribute is no longer stored. No reader changes behaviour, because
  there was none.

- When the agent could not store a task's final status, or its RUNNING
  status, the log line ended with the single word ClientError, which is
  the name of every AWS error. A refused permission, throttling and an
  invalid request all looked the same, and a lost final status is what
  later makes the platform fail the task as 'Agent session lost'. The
  two log lines now carry the error code and message, like the other
  status-write log lines in the same module.
  Gain: Whoever reads the agent log after a lost status write sees the
  cause (for example AccessDeniedException or ValidationException and
  its message) instead of one opaque word. 2 lines changed.

- Files that a user attaches to a task (screenshots, logs) are
  downloaded into a .attachments folder inside the repository clone the
  agent works in. Git treated them as new, untracked work: a 'git add
  -A' or 'git add .' by the agent would put the uploads into the pull
  request, a 'git clean -fd' would delete them and a 'git stash -u'
  would put them away in the middle of the task. The folder is now
  listed in the clone's local exclude file, which is never committed, so
  these commands skip the uploads. The design document already said the
  folder was ignored; now it is.
  Gain: A user's uploads can no longer reach a pull request through a
  broad git add, and a 'git clean -fd' or a 'git stash -u' no longer
  takes them away. A clean or stash that also asks for ignored files
  still removes them ('git clean -fdx', 'git stash -a'), and 'git clean
  -fdX', which kept them before, now deletes them. The end-of-task
  safety net also stops logging 'Uncommitted changes detected' for every
  task whose only untracked files are its attachments. 7 lines added to
  the agent.

Audit findings of this area not changed here: 1 deferred, 0 not
reproduced.
krokoko pushed a commit that referenced this pull request Nov 19, 2026
The branch is rebased onto main e4fbf8a, which adds the Lambda MicroVM
approval lifecycle (#904), a contributor dev container (#1055) and a
check of the contributor mise release (#1056). Eight of the 99 commits
stopped the replay; each was settled where it stopped. This commit holds
what the two sides needed from each other where git saw no conflict.

Two definitions of one function, one variable declared twice:

- The hook builder of the agent had two tool-failure hooks: main's
  releases the MicroVM barrier after a failed tool call, this branch's
  feeds the stuck guard, and the second replaced the first. They are one
  hook now that does both, registered on every backend.
- The session start step declared `current` twice, once for this
  branch's check before the start and once for main's check after it.

Main's code under rules this branch switches on:

- Import order (eslint-plugin-import-x 4.18) in seven new MicroVM
  modules, and an import that main's change left unused.
- no-control-regex: the image identity check names control characters
  on purpose and says so.
- Recorded complexity: main added the --microvm-sleep-after option to
  the submit action, which may not grow; the option is parsed in a
  function of its own. Four functions that main extended carry their
  new value (task API 55, orchestrator construct 50, create-task 145,
  stack 123).
- The agent again imports asyncio (main uses it; this branch had
  removed the last use), and two of main's new test files use httpx2,
  the client that mcp 2 brought, in place of httpx.

Tests that meet the other side's change:

- The stack test of the per-user limit reads the nested stack that
  main moved the admission-queue pickup into.
- Main's test of the STS client expects the retry mode this branch
  names on every client.
- The approval wait ends within the last second of its window, since
  main counts the window from the request's own timestamp.
- The runner tests' client double has the disconnect main now calls.

Generated: yarn.lock gets @aws-sdk/client-ssm, which main added, at
3.1166.0 like its sibling clients; the bootstrap template is rendered
again (one folded line).
krokoko pushed a commit that referenced this pull request Nov 19, 2026
- The repo_config tool of the optional Tool Gateway returned its error
  flag under a name the Claude Agent SDK does not read (isError; the SDK
  reads is_error). A call that failed, because the gateway could not be
  reached, did not offer the tool, the remote tool reported an error or
  the repository argument was blank, was passed on as a successful call;
  only its text said that something had gone wrong. The handler now
  writes the flag under the name the SDK reads, and a new test calls the
  tool through the SDK's own server, where the flag is read.
  Gain: Bug fixed for deployments that switch on the Tool Gateway
  (optional, off by default); it was on main since the bridge was added.
  Called through the SDK, all 5 failing cases of a 7-case probe were
  handed to the Claude Code CLI marked as a success before the fix and
  none after. With the flag set, the agent log and bgagent watch show
  [ERROR], the web console marks the result, the trajectory records an
  error, and the pinned CLI reports the call to the model as a failed
  tool call (read in its code, not run against a model). The eleven
  existing assertions read the handler's own key and could not see the
  mismatch; the new test fails when the key is wrong.

- Tasks without a repository downloaded their attachments into one
  directory that all such tasks of an agent server share, and clearing
  up after a failed download removes that whole directory, files of
  other tasks included. Each task now downloads into a directory of its
  own, named after the task, as tasks with a repository already do.
  Gain: The shared directory came with this pull request, which added
  the download for tasks without a repository. No deployed backend runs
  two tasks in one filesystem, and an agent server also refuses a second
  task while one is running (#904), so this closes a way to lose files
  rather than a loss seen in practice. A task's download and its
  clean-up now touch only the task's own directory. One statement
  changes, plus the three comments that described the old directory and
  one assertion.

- The agent's own check for a pull request from a fork ran only when the
  clone already had a local branch with the name of the pull request's
  branch, which is the case for the default branch alone. A fork's pull
  request whose branch has the name of any other branch of the
  repository was not checked: the agent fetched and checked out the
  repository's own branch of that name, and an iteration would have
  pushed to it. The agent now asks GitHub about every pull request
  before it fetches the branch.
  Gain: The platform refuses a pull request from a fork before the agent
  starts (pre-flight, added by this pull request); this is the agent's
  second check, for a task that reaches it another way, such as a
  payload posted to a local agent server or a task created before the
  deploy. It now holds for every branch name instead of the default
  branch only. The fix deletes the probe for a local branch (the
  function is 10 lines shorter); the cost is one GitHub call at the
  start of each pull request task, with the retries the check already
  had.
krokoko pushed a commit that referenced this pull request Nov 19, 2026
- knip.json listed python3 among the binaries to ignore. Main added the
  entry for knip 6.23.0; the knip this branch installs (6.45.0) ignores
  python3 by itself and printed a configuration hint for the entry on
  every run of the dead-code check.
  Gain: the dead-code check prints nothing when it passes.

- The comments that define a complexity record (the cdk lint config and
  the test that holds the records) said that a record is the value the
  function had when the ceiling landed, only ever lowered. Four cdk
  records are higher than that: #904 added branches to those functions
  before anything held the records, and this pull request raised the
  records to what the functions measure. The comments now say so.
  Gain: the rule as written describes every directive in the tree.
krokoko added a commit to ClintEastman02/sample-autonomous-cloud-coding-agents that referenced this pull request Nov 19, 2026
…ws-samples#1052)

* chore(deps): upgrade the JavaScript workspaces and the tool pins

Every direct dependency of cdk, cli, web, docs, the root and the Jira
Forge app moves to its newest release that is at least seven days old
(published on or before 2026-11-10): 65 packages. Six are majors:
@aws/durable-execution-sdk-js 3, commander 15, js-yaml 5, jsdom 31,
react-router 8 and eslint-plugin-jsdoc 65. yarn.lock goes from 1429
to 1305 locked versions. Tool pins: knip 6.45.0, prek 0.5.10, semgrep
1.185.0, osv-scanner 2.7.1, grype 0.121.3, trivy 0.76.2.

Pins that the upgrade made unnecessary are removed: 20 of 29 root
resolutions, 4 of 5 Forge overrides, @types/js-yaml and two knip
ignores. Two resolutions are new, for the glob and the minimatch of
test-exclude (GHSA-3g3m-2fjr-6pw4, GHSA-g3hv-75wg-m249).

Code the new versions needed:

- js-yaml 5: load() throws on a block that holds no document, so
  parseSkillFrontmatter uses loadAll and a count. A SKILL.md with an
  empty frontmatter block stays a record without frontmatter instead
  of becoming MALFORMED_FRONTMATTER (4 tests). The dumper option
  quotingType is now quoteStyle.
- aws-cdk 2.1148.0 ships bootstrap template version 33: the template
  is regenerated. Its policies and the bootstrap versions the app
  requires do not change.
- commander 15 is ES modules only and Jest 30 cannot require() one on
  Node 22: ts-jest compiles that one package for the cli suites (the
  coverage contract carries the same key), and a new test loads the
  real package from a plain Node process.
- eslint-plugin-import-x 4.18 sorts parent imports before sibling
  imports: import lines move in 24 files, nothing else.
- Starlight 0.42 no longer ships its virtual-module declarations:
  docs/src/env.d.ts declares the five modules the overrides use.
- osv-scanner 2.7.1 renames ignoreUntil to effectiveUntil.
- engines.node is "^22.23.4 || ^24.15.0" in the root, cdk, cli and
  docs: the versions the shared lockfile installs on.

Held back: typescript 7 (no JavaScript compiler API, which ts-jest,
typescript-eslint, astro check and ts-node need), cdk-nag 3 (removes
NagSuppressions, 73 calls) and the Cedar pair (no cedarpy release on
a 4.13 or 4.14 core).

* chore(deps): upgrade the agent's Python dependencies and image pins

Ten packages move to their newest release that is at least seven days
old: bedrock-agentcore 1.26.0, boto3 1.44.0, claude-agent-sdk 0.2.179,
fastapi 0.162.4, mcp 2.3.0 (a major), pygments 2.21.0, pytest 9.2.0,
ruff 0.17.4, ty 0.0.100, uvicorn 0.54.0. The image moves with them:
Claude Code CLI 2.1.319 (the one the SDK bundles), mise 2026.11.6 at
its digest in place of "latest", and the python:3.13-slim digest of
Python 3.13.18.

Code the new versions needed:

- botocore 1.44.0 changes the default retry mode from legacy to
  standard (5 attempts become 3; 10 become 4 for DynamoDB).
  aws_session.py names "legacy" on both sessions and every client, so
  the agent retries as before; AWS_RETRY_MODE still wins (9 tests).
- mcp 2 replaces httpx with httpx2 and renames the result fields.
  gateway_tools.py uses streamable_http_client over an httpx2 client
  that carries the SigV4 auth and the same timeouts. With the old
  names every tool result read as successful and empty (4 tests use
  mcp's own client and types).
- Claude Code 2.1.311 and later fetch model settings from a host the
  DNS allowlist does not name: the runner sets
  CLAUDE_CODE_MODEL_CATALOG=off next to CLAUDE_CODE_USE_BEDROCK.
- ty 0.0.100 understands frozen pydantic models: seven test lines
  that assign to one on purpose carry a ty ignore, and mcp_servers is
  passed by name.

ty and pytest are now pinned exactly: an unpinned ty is what broke the
nightly lock refresh. The pydantic-settings constraint and the
starlette warning filter go with the packages that needed them.

Held back: claude-agent-sdk 0.2.180 bundles CLI 2.1.321, whose
changelog says mods written in a session turn on without asking in
bypass mode. Every task runs in bypass mode, so that release waits
for a live task that shows how such a mod meets the Cedar hooks.

* test(tooling): move the AWS Emulator pin to 1.0.489

1.0.489 is the newest build the package host serves on 2026-11-17:
GitHub already lists 1.0.490, but its package answers 403. The three
suites pass on it with the upgraded dependencies (12 cdk, 7 cli and
43 agent tests).

Five statements of the README were observed again on 1.0.489 and
hold: the two agent-registry refusals, the iss claim of a Cognito
token, first-login password rotation, and the 1,000-object ceiling
of a bucket. The other rows were not probed again, so the README
keeps "Recorded on emulator 1.0.481", as its procedure allows.

* chore(deps): install pip 26.3 in the agent image for the image scan

trivy 0.76.2, which the dependency upgrade pins, reads the list of
packages that pip vendors; 0.70.0 did not. On the pip of the base
image (26.2.2) it reports five HIGH findings, and the image scan
fails.

- The image now installs pip 26.3, which vendors urllib3 2.8.0 and
  msgpack 1.2.4. Four of the five findings are gone (CVE-2026-97687,
  CVE-2026-97689, CVE-2026-114613, GHSA-6v7p-g79w-8964).
- The fifth, CVE-2025-47273 in setuptools 70.3.0, is accepted until
  2026-12-16. pip ships only pkg_resources from setuptools, and the
  module the advisory names is not in the image. No pip release
  vendors a newer setuptools.

The scan of the rebuilt image reports nothing, both ignore entries
are in use, and the image starts and answers its health route.

* fix(agent): set updated_at when the agent changes a task's status

- When the agent itself changed a task's status (finished it, failed it,
  or paused it to ask for an approval), it left the task's updated_at
  time untouched, so the API kept returning the moment the task had
  started to run. A task that failed after three hours was listed under
  'Needs you' on the console's Overview as updated '3h ago', a
  repository whose last task had just finished showed its last activity
  as '3h ago', and tasks left the 'Done (24h)' and 'Failed (24h)'
  counters hours too early. The agent now sets updated_at together with
  the status, as every status change made by the rest of the platform
  already does. One status change is not covered yet: the return to
  RUNNING after an approval, because open pull request #904 rewrites
  that same statement.
  Gain: Bug fixed for every reader of updated_at: the console's
  'Updated' column, a repository's last activity, the 'Done (24h)' and
  'Failed (24h)' counters, the recent-failure flag and the API field now
  show when a task finished or paused, not when it started. Until now
  the value was wrong by the task's whole running time, up to 8 hours; a
  task waiting for an approval now shows how long it has waited. About
  15 lines of agent code, and the guide's example of a completed task
  shows the corrected value.

- The user guide said that every task record has a logs_url field with a
  direct link to its CloudWatch logs, and that it can be read from the
  task status output or from the API. Nothing ever returned that field:
  not the API, the CLI or the web console. The agent stored the link in
  the database only in the rare case where its own RUNNING write came
  before the orchestrator's, and no code read it. The guide now gives
  only the instruction that works (open the log group and filter by task
  id), and the agent no longer builds or stores the link.
  Gain: The guide stops promising a field that never arrives. 62 lines
  removed and 18 added: 20 lines of agent code and the five tests of the
  deleted link builder are gone, one small test stays to show that the
  attribute is no longer stored. No reader changes behaviour, because
  there was none.

- When the agent could not store a task's final status, or its RUNNING
  status, the log line ended with the single word ClientError, which is
  the name of every AWS error. A refused permission, throttling and an
  invalid request all looked the same, and a lost final status is what
  later makes the platform fail the task as 'Agent session lost'. The
  two log lines now carry the error code and message, like the other
  status-write log lines in the same module.
  Gain: Whoever reads the agent log after a lost status write sees the
  cause (for example AccessDeniedException or ValidationException and
  its message) instead of one opaque word. 2 lines changed.

- Files that a user attaches to a task (screenshots, logs) are
  downloaded into a .attachments folder inside the repository clone the
  agent works in. Git treated them as new, untracked work: a 'git add
  -A' or 'git add .' by the agent would put the uploads into the pull
  request, a 'git clean -fd' would delete them and a 'git stash -u'
  would put them away in the middle of the task. The folder is now
  listed in the clone's local exclude file, which is never committed, so
  these commands skip the uploads. The design document already said the
  folder was ignored; now it is.
  Gain: A user's uploads can no longer reach a pull request through a
  broad git add, and a 'git clean -fd' or a 'git stash -u' no longer
  takes them away. A clean or stash that also asks for ignored files
  still removes them ('git clean -fdx', 'git stash -a'), and 'git clean
  -fdX', which kept them before, now deletes them. The end-of-task
  safety net also stops logging 'Uncommitted changes detected' for every
  task whose only untracked files are its attachments. 7 lines added to
  the agent.

Audit findings of this area not changed here: 1 deferred, 0 not
reproduced.

* fix(agent): fail task start on a Cedar rule that cannot be evaluated

- When a user denies an approval request, further attempts by the agent
  that match the same rule are refused at once for a minute, without
  asking again. Each such refusal is supposed to leave an event in the
  task's event stream. For this kind of refusal the event carried the id
  of the denied rule, a field the event writer did not accept: the error
  was swallowed and no event was written. The writer now accepts the
  rule id, so the event is written and names the rule.
  Gain: Retries refused after a human denial (for example a force push
  retried on another branch) now appear in the task's event stream,
  which is what bgagent watch shows and what is kept as the audit
  record, with the id of the denied rule. Before, they left no trace
  there, only a warning in the agent log on every such retry and an
  error line after five. Six lines of product code.

- A Cedar rule from a blueprint or the registry can read the shell
  command or the file path in a request that has none. Two examples: a
  rule with no action that tests context.command, and the usual rule
  that blocks the Bash tool, extended with a test of the command. Such a
  rule passed the check at task start, and then every tool call it
  applied to was denied as an engine error: every call of the task with
  the first example, every shell command with the second. The check at
  task start now evaluates one call of each kind of tool the engine
  tells apart (a Read, a Write, an Edit and a Bash call), through the
  routine the engine uses at run time, and treats an evaluation error
  from Cedar as a failure. The task then fails at start with Cedar's
  message, which names the missing attribute.
  Gain: A rule of this kind now fails the task at once with a clear
  error, which is what the engine's own documentation says of an invalid
  blueprint policy, instead of a task that spends its turns and budget
  on denied calls. This holds for a rule that applies to every tool
  call, to file writes, to shell commands, or to the Read, Write, Edit
  or Bash tool by name; a rule that names another tool (Glob, an MCP
  tool) is still found only when that tool is called. A task that used
  to run in spite of such a rule now fails at start as well: for example
  a read-only task whose blueprint has a rule that errors on file
  writes, which that task never evaluated. Policy text that cannot be
  parsed is now caught by this check as well. The check no longer
  repeats the engine's request names by hand and is 3 lines shorter than
  the code it replaces.

- The engine refuses to start a task whose policy it cannot use: text
  that is not Cedar, an approval timeout that is not a number, an
  unknown severity, a rule id that repeats a built-in rule of the same
  tier, and a hard rule placed among the soft rules. None of these five
  refusals had a test: each could be deleted and every test still
  passed. One parametrized test now has a row for each.
  Gain: Each of the five refusals at task start is now pinned: deleting
  any one of them fails exactly one row and no other test (shown by
  deleting each in a copy of the code). No product change; 51 lines of
  test.

- A pre-approval is checked before the one-minute memory of a recent
  denial, so that a user who denies one call and then approves the whole
  tool is not refused on the retry. This order is documented but had no
  test: the two steps could be swapped and every test still passed. A
  test now denies a call, pre-approves the tool and expects the retry to
  be allowed.
  Gain: The last unpinned pair in the order of the decision steps has a
  test: with the two steps swapped it fails (the retry is still denied)
  and no other test does. No product change; 14 lines of test.

- The object that carries the result of a policy evaluation was a
  hand-written class with its own constructor, equality, hash and text
  form. Its comment gave the reason: tests could still build it with an
  old allowed= keyword, which no product code uses. It is now a frozen
  dataclass with the same fields, defaults, keyword-only construction,
  equality and hash, and assigning to a field of a decision after it is
  built now raises an error. The tests of the old keyword are removed.
  Gain: 89 lines removed net (72 of product code, 17 of tests).
  Assigning to a field of a decision (outcome, reason, rule ids and the
  rest) between the engine that makes it and the hook that enforces it
  now raises an error; the dictionary that a cache hit carries for its
  event is still an ordinary dict. The class now has the form the design
  document gives for it.

Audit findings of this area not changed here: 2 deferred, 0 not
reproduced.

* fix(registry): stop publish stranding records and hiding the reason

- Publishing a registry record waits for the new record to finish
  creating. That wait was allowed to last 60 seconds, inside a function
  that is stopped after 15, so a record that needed more than about 12
  seconds was left behind as a draft that blocks every retry of that
  version, the publisher got a bare gateway error, and no log line named
  the record. The publish function now gets 28 seconds (API Gateway
  allows 29) and the wait is 20 seconds, so a slow create either
  completes or ends in the designed error that names the stranded
  record.
  Gain: A create that takes between about 12 and 20 seconds now
  publishes instead of stranding a draft. A slower one returns the 502
  that carries the record id, and logs it, instead of a gateway error
  with nothing in the log. The branch that reports a record stuck in
  creation could never run in the deployed function and now can. The
  three read functions keep 15 seconds.

- To find the records of one asset, the registry client fetched every
  record of the same kind and namespace in full, one call after the
  other, and only then kept the ones with the right name. The list it
  starts from already carries each record name, so it now skips the
  records of other assets before fetching them. Resolving a pinned asset
  and the duplicate check before a publish no longer fetch the records
  of other assets. The listing itself is unchanged: one call per 50
  records of the whole registry.
  Gain: Resolve and the publish duplicate check send one
  GetRegistryRecord per record of the asset in question instead of one
  per record of its kind and namespace: 1 instead of 4 and 0 instead of
  3 in the tests, and up to 119 sequential calls less per resolved pin
  in a namespace of 120 records, at every task start that pins an asset.
  Results are unchanged. The show command still fetches every record of
  the kind and namespace: its handler
  (cdk/src/handlers/registry-show.ts, not changed by this commit) has to
  pass the asset name to get the same saving.

- When the version being published is already taken by a record whose
  stored content is corrupt, the registry client prepares a 409 message
  that says so and tells the publisher to have that record deleted. The
  handler replaced every conflict message with one fixed sentence, 'A
  record with these coordinates already exists.', so the hint never
  reached anyone. The handler now returns the conflict message it was
  given.
  Gain: The publisher who hits a corrupt slot learns that the record has
  to be deleted, instead of concluding that the version is published and
  fine. A conflict reported by AWS itself keeps its own text as well.
  One line changed, one hard-coded sentence less.

- When AWS refused a record as invalid (a name or version longer than
  255 characters, a descriptor above its size limit, a server.json that
  does not follow the MCP schema), the publisher got 500 'Failed to
  publish record.' and had to ask an operator to read the function log.
  The publish handler now answers 400 with the reason AWS gave.
  Gain: A publisher who sends something the registry cannot store is
  told what is wrong and can fix it alone, where before it looked like
  an outage and needed an operator and a log search. The AWS user guide
  lists descriptor schema errors at record creation as a common case.
  Three lines.

- The publish handler checked namespace, name and asset_version with a
  regular expression only, and a regular expression test converts what
  it is given to text, so a one-element list or a number passed as if it
  were a string. The duplicate check behind it compares with strict
  equality, so it found nothing and the handler went on to send the
  create request for coordinates that were already published; whether
  AWS then stores a second record is not established. All three fields
  must now be strings, or the request is answered 400.
  Gain: The 400 the API promises for a malformed body, and a duplicate
  check that the shape of a request can no longer switch off. Three
  conditions changed, no new branch.

- An exact pin such as 1.0.0-rc.1 also matched a version published as
  1.0.0-rc.01, because numeric prerelease parts were compared as
  numbers; with both published, which one a task got depended on the
  order of the listing. Separately, the TypeScript resolver rounded
  numeric prerelease parts above 2^53 and could pick a different version
  than the Python resolver. An exact pin now matches only the version as
  written, in both languages, and TypeScript compares those parts
  exactly.
  Gain: An exact pin returns the pinned version and nothing else, and
  the two resolvers rank numeric prerelease identifiers the same way,
  whatever their length: a comparison of the two on 921,777 generated
  inputs shows no difference. Rare inputs; two one-line changes in
  TypeScript and two small ones in Python (the second came from the
  review: a pin with an identifier of more than 4300 digits made the
  Python resolver raise ValueError).

- The Python copy of the registry reference grammar is documented as a
  byte-for-byte mirror of the TypeScript one, and it was not. It
  accepted digits from other scripts (1.1 followed by an Arabic-Indic 2
  was read as minor version 12), gave a reference that ends in a
  carriage return a different error reason, and failed with a plain
  ValueError on a version component of more than 4300 digits. The Python
  patterns now accept ASCII digits only, exclude the same line
  terminators as JavaScript, and reject an over-long component before
  converting it.
  Gain: Both parsers give the same verdict and the same reason for these
  inputs, which is what the parity contract between the platform and the
  agent promises. No production code calls the Python parser today, so
  this removes a trap for its first caller, not a live failure. Five
  small edits in two files.

* fix(agent): correct the secret scanners and the content sanitizer

- The agent's scanner for secrets in tool output took any web address
  for a connection string with a password as soon as a colon and an at
  sign appeared anywhere after it, even several lines later. A git log
  with a link and an author address, a package manifest or an npm error
  was reported as a leaked secret, and where the scanner's redaction is
  applied everything from the link to the word after the at sign was
  replaced by a marker. A connection string is now a URL whose user and
  password stand directly in front of the host; the user may be an
  e-mail address. An AWS access key pair (key id, colon, the 40
  characters of the secret) is replaced wherever it stands, and a URL
  whose user is an access key id is replaced as a whole, also when its
  password holds a slash, as nearly half of all secret keys and of the
  SMTP passwords of Amazon SES do. A URL whose password position holds a
  placeholder and nothing else ({password}, ${DB_PASSWORD}, %s,
  <password>) is left as it is: it is a template in source code or
  documentation, not a credential, and since the agent reads files
  through this scanner, a marker in place of such a line kept the agent
  from editing the line and could reach a pull request.
  Gain: Ordinary tool output (a git log, a package.json, a README, an
  npm error) is no longer reported as a leaked secret, and no part of it
  is replaced by a marker in what the agent reads. The pattern also
  stops being quadratic in the number of URLs (3,000 URL lines, 190 KB:
  about 1 s before, 5 ms now, measured here); tool output is usually far
  shorter, so that is a safety margin, not a visible speed-up. A key id
  followed by a colon and its secret is now replaced as a pair outside
  URLs as well, where only the key id used to be. The agent can read and
  edit a line that builds or documents a URL with a placeholder in the
  password position ({password}, ${DB_PASSWORD}, %s, <password>), and
  writes no marker into the repository through it: in 2,422 fragments of
  public code sampled for this change, 785 of the 1,353 URLs with a user
  and a password that the scanner replaced were such templates.

- Two secret scanners that say they mirror each other did not detect the
  same things. The agent's scanner of tool output knew long-term AWS
  access key ids (AKIA) but not temporary ones (ASIA), the kind every
  role session has, the agent's own included. The scanner for the reason
  of a denied approval matched GitHub tokens of exactly 36 characters
  only, so a token of a longer format stayed in the text. Each side now
  matches what the other already did.
  Gain: A temporary AWS access key id in tool output is flagged and
  redacted like a long-term one. A longer GitHub token typed into a deny
  reason is redacted before the reason is stored on the approval record
  and in the audit event (kept 90 days by default) and before it is
  shown to the agent.

- The code that hands a user's nudge to the running agent handled the
  same errors three times. Marking a nudge as consumed carried two
  branches that only served hand-made exception classes of its own
  tests, and a guard against the AWS SDK not being installed, which is a
  pinned dependency. The hook around it wrapped three calls in more
  try/except blocks, two of them with a suppression of the
  silent-failure lint rule, although two of the calls catch every error
  themselves and the third only formats strings. The extra layers are
  removed; what the functions return is the same for every input.
  Gain: 44 lines of product code and 17 lines of test code removed
  (net), two suppressions of the silent-success-masking rule and two
  coverage-exclusion comments gone. The 8 statements of the nudge hook
  that no test could reach no longer exist.

- The agent's reader for user nudges sends DynamoDB two expressions: a
  filter that selects the nudges not yet consumed, and a conditional
  update that marks a nudge consumed only once. Both had only ever run
  against a mock that returns what the test scripted, so a wrong filter
  value or condition passed every test while nudges stopped arriving, or
  came again after a restart. A test in the emulator tier now runs the
  reader against DynamoDB semantics: of a pending nudge, a consumed one
  and the rate-limit row that share the table, it reads the pending one
  alone, consumes it once and reads nothing afterwards.
  Gain: The read and the write of the nudge feature are checked by the
  service's own evaluation of their expressions, including the alias
  that the reserved word 'consumed' needs. Both mutations the finding
  names fail the new test (a wrong filter value returns no nudge, a
  wrong condition marks none), and all 44 agent tests of the emulator
  tier pass with the extended fixtures.

- The sanitizer for outside text (issue and pull-request bodies,
  comments, memory records) removed control characters, text-direction
  marks and stray byte order marks only after it had looked for
  instruction prefixes, injection phrases and HTML tags. One such
  invisible character inside 'SYSTEM:', inside 'ignore previous
  instructions' or inside a script tag hid it from the check and was
  then removed, so the text reached the prompt intact. Both copies of
  the sanitizer, Python and TypeScript, now remove these characters
  first.
  Gain: An instruction prefix, an injection phrase or a dangerous tag
  can no longer be slipped past the sanitizer with a character the
  sanitizer itself deletes, and sanitizing text that is already
  sanitized changes nothing for these inputs, which the agent's models
  rely on. Output changes only for text that contains such characters.

- The test that claimed to check the registered clarification tool built
  a second tool of its own and checked that one, so the real tool's
  name, its question parameter and its handler were never tested.
  Renaming the tool or its parameter passed every test while breaking
  the feature that lets the agent hold a task and ask the requester a
  question. The test now captures the tool that is really registered and
  checks the name the runner matches on, the parameter the runner reads
  and the reply of the handler.
  Gain: The contract between the tool and the runner is pinned: renaming
  the tool, renaming its parameter or breaking its handler now fails a
  test (each was tried and reverted). A test that could not fail is
  replaced by one that can.

- The scanner that redacts secrets from the reason a user gives when
  denying an approval is described as a port of the agent's output
  scanner, but its patterns were narrower. A quoted AWS secret key, one
  in the JSON form that 'aws sts' prints, one ending in a slash, the
  secret of an AWS key pair in a URL, a database URL with a password, a
  git URL carrying a token, a short fine-grained GitHub token and a
  bearer token after 'BEARER' in capitals all passed through unredacted.
  The port now redacts all of these, as the agent's scanner does, and
  the agent's scanner gains the Slack token pattern that only the port
  had. Both scanners also learn the format of the GitHub App
  installation tokens that GitHub issues since 2026 (ghs_, the app id,
  an underscore and a JWT, about 520 characters): neither recognised
  such a token in an assignment, as a JSON value or after
  'Authorization: token'. The pattern for a token in a git URL,
  quadratic in both scanners on text that repeats 'x-access-token:', is
  now linear and takes a token of any length. In both scanners a URL
  whose user is an AWS access key id is replaced as a whole, and one
  whose password position holds only a placeholder is left as it is.
  Gain: A secret pasted into a deny reason in any of these shapes is no
  longer written to the approval record, kept in the audit event (90
  days by default) or injected into the agent's context. Tool output
  that holds a Slack token is now recognised by the agent's scanner. A
  text that repeats 'x-access-token:' no longer costs quadratic time:
  100,000 such characters took 391 ms in the deny-reason scanner and 1.8
  s in the agent's scanner, and take 10 ms and 35 ms now (measured
  here). A GitHub App installation token of the format that GitHub
  issues by default since October 2026, which is also the format of the
  GITHUB_TOKEN of a GitHub Actions run, is replaced when it shows up in
  tool output or in a deny reason; until now only the 40-character
  format was. The platform's own GitHub access is a personal access
  token today and is planned to become a GitHub App, whose tokens have
  this format. A deny reason that quotes a line of code with such a URL
  template reaches the agent as it was written.

* fix(api): stop five read endpoints from failing or hiding data

- Listing a repository's Cedar rules answered 503 'policy set invalid'
  when its Blueprint held a rule written without annotations, although
  tasks run with such a rule: the agent names it legacy_extra_<n> and
  asks for approval under that name. The listing now gives those rules
  the same generated names. A Blueprint rule annotated as hard is now
  listed with the hard rules instead of in neither list.
  Gain: bgagent policies list works for repositories whose Blueprint
  holds plain Cedar rules, and it shows the rule ids that approval
  requests name and that --pre-approve rule:<id> takes.

- The policy listing read the repository's row twice. When the second
  read failed it answered 200 with the built-in rules only and kept that
  answer in its cache, so for five minutes the callers served by that
  Lambda instance were told the repository had no rules of its own. It
  now reads the row once; a failed read fails that one request and
  nothing is cached.
  Gain: No wrong listing after a transient DynamoDB error, and one
  DynamoDB read instead of two on every uncached call.

- The console's issue picker asked GitHub for the 50 most recently
  updated items and then removed the pull requests, which GitHub returns
  on the same endpoint. A repository with many open pull requests showed
  few of its issues, or none together with the text that it has no open
  issues. The handler now reads up to three pages of 100 items until it
  has 50 issues, with one time limit for all pages.
  Gain: The picker shows up to 50 open issues whatever the share of pull
  requests among a repository's 300 most recently updated items. Counted
  on GitHub's live data on 2026-11-17: 50 issues instead of 30 for this
  project's own repository, instead of 17 for aws/aws-cdk and instead of
  13 for kubernetes/kubernetes.

- Every request for a repository's issue list called GitHub with that
  repository's token, the one the orchestrator and the agents also use,
  and nothing kept a script or a reloading browser tab below ten
  requests a second. The answer is now kept for one minute per
  repository, which is as long as the console itself treats the list as
  fresh.
  Gain: Repeating the request for one repository no longer costs a
  GitHub call each time: a delivered list is reused for a minute, so the
  cost is at most three GitHub calls a minute per repository and Lambda
  instance. Before, a script or a reloading tab could spend up to 36,000
  calls an hour (10 requests a second) of a token that has 5,000 an hour
  as a personal access token. Not covered: a caller that asks for many
  repositories; that needs a throttle on the route.

- Downloading a trace whose file is gone answered 500 Internal server
  error instead of 404 TRACE_NOT_AVAILABLE. Trace files are deleted
  after 7 days while the task record stays 90 days, and the handler's
  role may read objects but not list the bucket, in which case S3
  answers 403, not 404, for a missing file. The handler now treats that
  403 as a missing trace and logs the status.
  Gain: bgagent trace download on a task older than a week prints the
  CLI's 'No trace artifact' explanation instead of an internal error,
  and the handler stops writing an ERROR log line for each such request.

- The replay bundle stops adding events at 5 MiB to stay under Lambda's
  6 MB response limit, but it measured each event before the escaping
  the response adds: the bundle travels as a string inside the Lambda
  result, where every quote and backslash takes two bytes. A long trace
  whose previews are JSON, such as tool results that carry JSON inside
  JSON, went over the limit and the request ended in 502. Events are now
  counted at the size they have in the response.
  Gain: The replay of a long --trace task is returned, clipped and
  marked as truncated, whatever its previews contain. Measured with
  4,000-character previews: 6.9 MB before for JSON inside a JSON string
  (over the limit), 5.2 MB after.

- The list of pending approvals allowed each user 10 calls a minute. The
  operator console asks for it every 10 seconds in each visible window,
  and again when a page that shows approvals opens (the overview, the
  inbox, most task pages), when a hidden window is shown again and after
  each decision, so a second window or some clicking reached the limit,
  and the approvals inbox then showed a rate-limit error in place of the
  requests until its next poll. The default limit is now 60 a minute.
  Gain: The approvals inbox no longer turns into an error for a user
  with two console windows, or with the console and the CLI side by
  side; a runaway script is still held to one call a second.

* fix(agent): keep session-only .mcp.json edits out of pull requests

- Before a session starts, the agent removes any Linear MCP server from
  the repository's .mcp.json and, on Jira tasks, adds a placeholder
  entry to it. Both edits are meant for that session only, but when the
  repository tracks the file, the commit the platform makes at the end
  of a task to save uncommitted work picked the edit up, and the push
  put it into the pull request. The agent now tells git to ignore its
  own edit of a tracked .mcp.json, so the edit stays out of every
  commit.
  Gain: Pull requests no longer carry the platform's own change to a
  tracked .mcp.json: the team's Linear server removed (or the whole file
  deleted), or a dead Jira placeholder added on Jira tasks. Before, the
  commit that saves uncommitted work at the end of a task included that
  change when the tracked file named a Linear server or the task came
  from Jira, unless the agent had already committed the file itself. A
  task that only answers a question is no longer reported as a code
  update, and git rebase starts again in those clones (it refused
  because of the modified file) as long as the commits it moves onto
  leave .mcp.json alone. Limits, the first two shared with tasks that
  load registry MCP servers: when the platform rewrote the file and the
  branch to merge or rebase onto changed it too, git still stops and git
  stash no longer clears the way; a task that is itself asked to change
  .mcp.json on such a repository cannot commit that change with git add
  or git commit -a; a .mcp.json that is a symlink to another tracked
  file is not covered.

- A .mcp.json saved in a legacy encoding such as Windows-1252, or as
  UTF-16, made the agent's reader raise an error it does not catch, and
  every task on that repository failed, after the clone and the baseline
  build had already run. The reader now decodes the file the way the
  Claude CLI does (a byte that is not UTF-8 becomes a replacement
  character), and a file that still cannot be parsed is skipped with a
  warning, as the reader always promised. The registry loader had an
  identical copy of the reader; it now uses the same function.
  Gain: Tasks on such repositories run instead of failing once the
  clone, the install and the baseline build are done. The Linear scrub
  also sees the servers of a legacy-encoded file, which the CLI does
  load. One reader instead of two identical copies: the registry loader
  is 18 lines shorter.

- A .mcp.json that starts with a UTF-8 byte-order mark (written by
  Windows PowerShell 5 or Visual Studio) is read by the Claude CLI, but
  the agent treated it as broken JSON. The Linear scrub then removed
  nothing from it, and a Jira task or a registry asset replaced the
  whole file instead of adding to it. The agent now drops the mark when
  it reads the file, as the CLI does.
  Gain: The rule that the agent has no Linear MCP tools now holds for
  files saved by Windows tools: before, such a file kept its Linear
  server while the Linear token was exported, with only a warning that
  read as if the file were ignored. Jira tasks and registry assets keep
  the repository's other MCP servers instead of dropping them for the
  session.

- The Gateway bridge sorts a failed call into an expected hiccup (a
  warning) or an unexpected fault (an agent error) by the type of the
  exception. The MCP client hands every failure over wrapped in an
  exception group, so every failure was logged as an unexpected agent
  error, and both the log and the model saw only 'unhandled errors in a
  TaskGroup'. The bridge now unwraps a group that holds one error and
  classifies and reports that error.
  Gain: A refused connection, a timeout or an error answer of the
  Gateway shows up as one warning with its real cause instead of an
  agent error without one, and the model reads the cause as well. A
  missing or ambiguous federated tool, the one message that names a
  deployment fault, is reported with the tool names the Gateway does
  expose. One routine failure is still logged as an agent error without
  its cause: a request that times out and is answered late, while the
  session is being closed, is reported as 'BrokenResourceError'. Apart
  from that the agent error stream stops collecting routine hiccups. Two
  identical return blocks became one; the function is no longer than
  before.

- The bridge allows 20 seconds for one round-trip to the Gateway, but
  only the tool call had that limit. The handshake and the tool listing
  had none, so a Gateway that accepted the connection and then never
  answered held the model's tool call until the HTTP read timeout of 300
  seconds. The limit is now set on the session, which applies it to
  every request.
  Gain: A Gateway that does not answer the handshake costs the agent 20
  seconds instead of 300 inside one tool call. The same holds for a
  stalled tool listing as long as the Gateway still answers the request
  that closes the session; if it has gone silent altogether after the
  handshake, closing the session still waits for the HTTP read timeout,
  as before. One argument moved, no new setting, 2 lines fewer.

- The helper that posts reactions on a Linear issue promises to swallow
  every failure, but an HTTP 200 whose body is not a JSON object (an
  HTML page from a proxy, or 'null') raised out of it. At the end of a
  task that turned a delivered task into FAILED; at the start it failed
  the task before the clone. Such an answer is now logged as a warning
  and treated like any other failed reaction, as the Jira helper already
  does.
  Gain: An answer with status 200 whose body is not a JSON object can no
  longer fail a task whose work is delivered, or one that has not
  started. Linear and Jira treat that input the same way.

- When Jira rate-limits the app, the Forge proxy passes the HTTP 429
  through. The agent logged that as a request the proxy refuses for good
  (ERROR, JIRA_APP_ACTOR_PROXY_REJECTED), while the Lambda copy of the
  same rule logs it as transient (WARN, JIRA_APP_ACTOR_PROXY_TRANSIENT).
  The agent now classifies a 429 as transient as well.
  Gain: The two copies of the rule agree. An operator who searches the
  agent log for REJECTED to find configuration faults (bad signature,
  invalid payload) no longer finds rate limits. Only the log level and
  the id change; nothing is retried differently.

* fix(registry): delete a registry's records before deleting the registry

- A stack whose agent registry holds a published asset could not be
  deleted, and switching the registry feature off left the registry and
  its records in the account. AWS refuses to delete a registry while it
  holds a record, and the custom resource that manages the registry
  treated that refusal as temporary: it sent the same delete at every
  poll, deleted no record, and after 15 minutes its delete failed with
  'Operation timed out'. The custom resource now deletes the records
  first, for at most 30 seconds per invocation so that a large registry
  is emptied over several polls, and then deletes the registry. Its two
  Lambda roles get the two permissions this needs, ListRegistryRecords
  and DeleteRegistryRecord. A stack deployed before this change still
  runs the old handler: deploy the change once, with the registry
  enabled, before removing the registry or the stack. Tested with unit
  tests and on the emulator; not run against AWS.
  Gain: Bug fixed: deleting a stack now completes when assets are
  published, and deploying with enableAgentRegistry=false now removes
  the registry and its records, which is what the deployment guide and
  the design documents already promise. Before, the custom resource's
  delete of such a registry timed out after 15 minutes with a message
  that does not mention records. A stack deletion ended in
  DELETE_FAILED. A deploy with the feature off completed all the same,
  because CloudFormation gives up on a resource it cannot delete during
  an update (CloudFormation user guide): the registry, its records and
  the nested registry stack stayed in the account, no longer part of the
  stack. In both cases the operator had to delete each record by hand
  with the AWS API, because ABCA has no command for it. Cost: 46 lines
  of product code in 2 files, 2 IAM actions on the resource pattern the
  roles already had (registry/*, which also matches the records of every
  registry of the account in that Region), and the first emulator-tier
  test of the registry (about 5 seconds).

- The emulator README listed two agent registry answers under operations
  that do not work on the emulator and said that neither had been
  compared with AWS. Both have been checked since. The refusal to delete
  a registry that holds records is what AWS does; the custom resource
  now handles it and an emulator test covers it, so that sentence is
  removed. The refusal of a second record under a name the registry
  already holds, whatever its version, is the emulator being stricter
  than the AWS user guide, which says that name and record version
  together must be unique; it is now a row in the table of known
  differences, and the trust table says what a green run shows for the
  registry.
  Gain: A contributor who reads the README to decide where a registry
  test belongs is no longer led to suspect ABCA's publish code for a
  difference that the AWS user guide puts on the emulator's side, and
  learns that creating and deleting the registry through the custom
  resource can now be tested on the emulator. Documentation only: 3
  lines added, 2 removed.

* fix(api): make confirm-uploads fail closed and safe to repeat

- A task that combines a large local file with a URL attachment could
  never be confirmed. Large files are uploaded straight to storage and
  then confirmed; the confirmation also looked in storage for the URL
  attachment, which is only fetched later, when the task starts. So it
  answered 'upload not found' on every attempt and the task was
  cancelled 30 minutes later. The confirmation now checks and screens
  only the files the client uploads and leaves the URL attachment to be
  fetched when the task starts.
  Gain: Submitting a local file over 500 KB together with a URL
  attachment works. Until now it failed every time after 3 seconds and
  left a task that was cancelled 30 minutes later with the unrelated
  reason 'Upload window expired'.

- When an upload is rejected during confirmation, the task is failed and
  its uploaded files are deleted. The storage bucket keeps old versions
  of files, and the delete request named the files without their
  version, which only hides them: the rejected content stayed
  retrievable by version for 7 days. The delete request now also names
  the version that was just checked, so that content is removed at once.
  A second confirmation of the same task that is still screening at that
  moment can no longer read the files; it now answers that the upload is
  no longer in storage, instead of reporting the screening as
  unavailable and asking to try again later.
  Gain: Rejected content is gone from storage when the task fails, as
  the comment in the code already promised, instead of staying readable
  by version id for 7 days. A confirmation that runs at the same time is
  told that the upload is gone (400) and not to try again later (503)
  for a task that has failed for good.

- When the content filter blocked one upload, the confirmation still
  screened all the remaining uploads before failing the task. If it ran
  out of time while doing so, it saved its progress, including the
  blocked file, and told the client to retry; the retry skipped the
  blocked file and submitted the task. Now the first blocked upload
  stops the screening and fails the task, a blocked file is never saved
  as progress, and a task that already holds a blocked file is failed
  instead of submitted.
  Gain: A task that holds a blocked attachment can no longer be
  submitted: the path by which a retry stepped over a blocked file is
  closed, and a block now ends the screening, so up to 7 content filter
  calls are no longer spent on a task that is already lost. A 4-line
  shortcut that went around the blocked check and the size check is
  deleted.

- API Gateway ends a request after 29 seconds, but confirming several
  large attachments can take longer. The confirmation then keeps running
  on the server and submits the task, while bgagent submit printed 'HTTP
  504: Gateway Timeout' and exited with an error, which invites
  submitting the same task a second time. After such a timeout bgagent
  submit now reads the task every 5 seconds until the confirmation has
  finished (for at most 165 seconds), then asks for the result and
  prints the task, or the error if the confirmation failed the task. A
  read that fails for a moment is repeated. It sends at most three
  confirmations.
  Gain: A confirmation that takes longer than the gateway's 29 seconds
  is no longer reported as failed by the CLI while it succeeds on the
  server: the command waits for the confirmation that is running,
  instead of starting a second one beside it, and then asks for the
  result. One case remains in which the command ends with an error
  although the task may still be submitted: a third confirmation that
  outlasts the gateway as well. For this finding only the CLI changes;
  the server still measures its deadline against its own 180 seconds.

- After a successful confirmation a task moves on through several
  states. A client that repeated the confirmation, for example because
  the first answer was lost, got the task back while it was submitted,
  hydrating or running, but an error 409 'cannot accept upload
  confirmations' once the task was queued behind the concurrency limit,
  waiting for an approval, or finalizing. A repeated confirmation is now
  answered with the task in every state in which the task is still
  alive.
  Gain: A retried confirmation gets the task back in all six live states
  instead of three, so while the task is alive a client is no longer
  told that a confirmation which succeeded was refused. The CLI change
  of this commit relies on it when it asks for the result after a
  gateway timeout.

- If the uploaded files together exceeded the 50 MB limit of a task, the
  confirmation deleted the files and returned an error, but left the
  task waiting for uploads. Repeating the confirmation then failed with
  'upload not found', and after 30 minutes the task was cancelled with
  the reason 'Upload window expired'. The task is now failed at once
  with the size limit as its error message, and the files are deleted
  only when that change of state succeeded, as for a blocked attachment.
  A client can no longer post smaller files to the same upload forms and
  confirm again; it has to create a new task.
  Gain: The task ends immediately with the real reason instead of being
  listed as waiting for uploads for up to 35 minutes and then reporting
  an expired upload window. Only API clients that declare a smaller size
  than they upload can get here; the CLI declares the real size.

- A file sent inline, by URL or from Linear or Jira is refused when its
  bytes do not match the declared type: an image must start with its
  signature, a text file must be valid UTF-8 without NUL bytes. Text
  files uploaded straight to storage, the path for everything over 500
  KB, skipped that check: an archive, an executable or UTF-16 text
  declared as plain text was shown to the content filter as garbled text
  and, if the filter found nothing in it, delivered to the agent. The
  confirmation now applies the same check before screening and fails the
  task when the bytes do not match.
  Gain: The path that takes the largest files follows the same rule as
  the four other ways an attachment arrives. A text attachment marked as
  passed can no longer be binary content or text in an encoding the
  content filter could not read.

* fix(agent): gate a force push written with the flag after the branch

- The policy engine carried five names that nothing reads: a constant
  listing the two rule tiers, a length method on the memory of recent
  denials, the category annotation copied into each parsed rule (the
  category that `bgagent policies` shows comes from the API handler,
  which parses the rule text itself), a task_type property that only its
  own two tests read, and an empty default for a parameter that every
  caller passes. All five are deleted, together with the two tests of
  the property. Nothing behaves differently.
  Gain: 20 lines removed net (10 of product code, 10 of tests). The
  engine exposes one property and one method fewer, and two internal
  functions lose a fallback that could never be reached.

- A built-in rule refuses `rm -rf /` and `rm -rf` of any other absolute
  path, and no approval can lift it. It recognised that one spelling:
  with the two flags the other way round, `rm -fr /` and `sudo rm -fr
  /var/lib/app` were allowed. The rule now matches `-rf` and `-fr`. It
  remains a match on these two spellings of the command text, not a
  parser of the command.
  Gain: The absolute rule against deleting from the root no longer
  depends on which of `-rf` and `-fr` is typed. Nothing else changes:
  the new pattern matches the text `rm -fr /` wherever it stands in a
  command, exactly as the old one matches `rm -rf /`. So `rm -fr
  /tmp/build` is refused like `rm -rf /tmp/build`, and so is a commit
  message or a grep that contains those characters, as it already was
  with `-rf`. One pattern added to the rule and to its TypeScript copy.

- A force push has to be approved by a human, but the built-in rule
  recognised the force flag only directly after `git push`. With the
  flag after the branch (`git push origin feature --force`,
  `--force-with-lease`, `git push origin feature -f`) the push ran
  without a question, even right after a human had denied the same push
  written the other way round. The rule now also matches ` --force`
  anywhere after `git push`, and ` -f` as the last word of the command.
  Side effects. The rule reads the command as text, so a command in
  which `git push` is followed later by ` --force` asks for approval
  too, whether that is the flag of another program (`git push origin x
  && npm install --force`) or words in a message (a push chained with
  `gh pr comment --body "... --force ..."`), and so does one that pushes
  and ends in ` -f` (`git push origin x && git clean -f`). In a task
  where `rule:force_push_any` is approved (`--pre-approve`, or `bgagent
  approve --scope`), a force push to main, master, prod or release/*
  typed with the flag last no longer asks: until now it asked as a push
  to a protected branch, while the same push typed `git push --force
  origin main` was already allowed by that approval. That holds for
  every command the widened rule now matches, a plain push to main
  followed by a program with `--force` included.
  Gain: A denied force push can no longer be repeated by moving
  `--force` or `--force-with-lease` behind the branch, or by putting
  `-f` last in the command: for a minute after the denial the retry is
  refused at once, afterwards it asks again (before: allowed without a
  question). A force push typed that way now asks for approval at all.
  The rule remains a match on the command text, not a parser of git's
  command line. Two patterns added to the rule and to its TypeScript
  copy.

Audit findings of this area not changed here: 2 deferred, 1 not
reproduced.

* fix(agent): pick the right branch and repository during repo setup

- A stacked child task whose predecessor had already been merged, with
  its branch deleted, was started from the default branch, but its pull
  request was still aimed at the deleted branch. The agent could not
  open that pull request, the platform then had nothing to compare the
  work against, and the task failed as a lost deliverable although the
  commits existed. The pull request now targets the repository's default
  branch, the branch the child was actually cut from.
  Gain: Bug fixed: a child task that starts after its predecessor was
  merged delivers its work as a pull request against the default branch,
  instead of failing after a complete agent run with a reason that says
  nothing was committed. Affects every orchestrated chain in which a
  predecessor is merged, and its branch deleted, before the next child
  starts.

- A review or iteration task on a pull request whose branch is the
  repository's default branch (a release pull request from develop into
  main) failed during setup with a git error, because the clone had
  already created that branch. Setup now checks the branch out. It first
  asks GitHub whether the pull request comes from a fork, because a
  fork's branch with the same name (a fork's main) is a different
  branch: without the question, setup would work on the repository's own
  branch and an iteration would push to it. Such a pull request is
  refused with a clear reason.
  Gain: Reviews and iterations no longer fail in setup on pull requests
  opened from the default branch (release, promotion and sync pull
  requests) with a git error nobody can act on. The fix opens no way to
  work on the wrong branch: a fork's pull request with that branch name
  is refused. No other task pays for it: GitHub is asked only for a pull
  request whose branch is named like the default branch, a case that
  always failed before, and the call is retried like the clone and the
  fetch.

- When the GitHub API call that asks for a repository's default branch
  failed (a timeout, a server error, a rate limit), setup assumed
  'main'. On a repository whose default branch is master or develop the
  task then ran to the end and could not deliver, or opened its pull
  request against a stale main. Setup now reads the default branch that
  the clone has already recorded locally, and falls back to 'main' only
  when that is missing too.
  Gain: A passing GitHub API failure during setup no longer costs a full
  agent run on repositories whose default branch is not main, and no
  longer sends a pull request to the wrong branch. No extra network
  call: the answer is read from the clone.

- When the task's repository is a fork, the GitHub CLI clone added the
  parent repository as a second remote and made it the default target of
  every later gh command that does not name a repository. An agent
  working in a fork (the Quick Start has every new user onboard one)
  could therefore read, review or comment on the parent project's pull
  requests instead of its own. The clone now passes --no-upstream, so
  the task's repository is the only remote and the default target.
  Gain: In a fork, the agent's gh commands act on the task's repository
  whether or not the model writes --repo: no review of another project's
  pull request, no comment or pull request on the parent, no permission
  errors from the parent on the Quick Start path. The clone also stops
  fetching the parent repository, a second download that could fail the
  clone step. One argument changed.

- A stacked child task fetched its base branch, and each predecessor
  branch it merges, a second time right after cloning, and took any
  failure of that fetch to mean the branch was gone. One network error
  was enough to start the child from the default branch, or without one
  of its predecessors, with only a setup note to show for it. The clone
  already holds every branch, so setup now looks the branch up there and
  falls back only when the branch really does not exist.
  Gain: A network error at setup can no longer make a stacked child
  start from the wrong base or without a predecessor's code. One network
  call fewer for the base of every stacked child, and one fewer for each
  predecessor branch that is merged.

* fix(cli): make the Linear commands work on a multi-workspace stack

- Events of a workspace added with `bgagent linear add-workspace` were
  rejected for as long as the stack had another active workspace. The
  command asked for the workspace's webhook signing secret but did not
  record that the workspace owns it, and on a stack with more than one
  workspace the webhook receiver answers every delivery of a workspace
  without that record with 401, while the command printed 'Workspace
  added'. It now asks for the secret before it stores anything, stores
  it with the token in one write, and records the ownership.
  Gain: For as long as the stack had another active workspace, a
  workspace added with add-workspace had its Linear deliveries answered
  401 (once the receiver's cached workspace count, five minutes, had
  refreshed) and started no task, until update-webhook-secret,
  backfill-secret-provenance or a re-run of setup recorded the
  ownership; add-workspace needs an existing workspace to start, so
  every workspace it added began in that state. A mistyped secret can no
  longer leave an active registry row whose credential bundle has no
  signing secret. One Secrets Manager write instead of two. The command
  is run by tests for the first time.

- `bgagent linear add-workspace` is meant to refuse a workspace that is
  already registered, but its check read one arbitrary row of the
  registry before filtering, so it only worked when that row happened to
  be the workspace's own; otherwise the command replaced the workspace's
  registry entry and credentials, dropping its Identity vault binding,
  and reported success. The check now reads the registry without a row
  limit (one Scan request, which covers a registry of up to 1 MB: about
  1,700 workspaces). Five messages that sent operators to add-workspace
  for a workspace it refuses now name `setup`: the next step printed by
  add-workspace, its team-keys warning, the remedy platform doctor
  prints for a revoked workspace, and the errors of invite-user and
  update-webhook-secret for a workspace that is not installed or was
  removed.
  Gain: On a stack with two or more workspaces, repeating add-workspace,
  which the CLI itself recommended, could silently move a vault-managed
  workspace back to stored tokens and make the webhook receiver reject
  its events. Operators are no longer sent through a browser consent
  that ends in a refusal. One unreachable branch removed.

- Two more registry lookups read one arbitrary row before filtering:
  `bgagent linear invite-user <slug>` reported a registered workspace as
  not registered unless its row was the one read, so on a two-workspace
  stack every invitation for one of the two workspaces failed, and
  `add-workspace` reported that no workspace was installed when the row
  read belonged to a removed workspace. Both now use the existing helper
  that reads all active rows.
  Gain: invite-user works for every workspace of a multi-workspace stack
  instead of only the one DynamoDB returns first, and add-workspace
  finds an installed workspace when a removed one exists. Two
  hand-written scans replaced by one existing helper: 14 lines of
  product code fewer.

- `bgagent linear setup <slug>` only printed a warning when the
  workspace authorized in the browser was not the one the slug names,
  and then wrote anyway: with the slug of another onboarded workspace it
  stored the wrong workspace's token in that workspace's credential
  bundle and pointed the authorized workspace's registry entry at it,
  behind 'Setup complete'. When the token goes to Secrets Manager it now
  stops before the first write, as add-workspace already did, in two
  cases: the slug is registered to another workspace, or the slug is not
  registered and the authorized workspace could have been set up under
  its own URL key. It goes on, with the warning, for a workspace that
  was only renamed in Linear and is set up again under the slug it is
  registered with, and for a workspace whose URL key the CLI does not
  accept as a slug (it wants 4 to 50 characters, Linear has shorter
  ones) under a slug that is free, the only way such a workspace can be
  set up. On a stack with the Identity vault a wrong authorization is
  still only warned about.
  Gain: On the Secrets Manager path, clicking Authorize while Linear
  shows another workspace can no longer mix two tenants' tokens and
  signing secrets (still only warned about: a workspace whose URL key
  cannot be a slug, authorized under a slug that is free). Workspaces
  that are already registered, renamed ones included, can still be
  re-authorized under the slug the registry and platform doctor know,
  and a workspace whose URL key cannot be a slug can still be set up.

- Linear answers a token it refuses with HTTP 200 and a list of errors
  instead of data. `bgagent linear list-projects` read that answer as an
  empty project list and told the operator to create a project, and
  `onboard-project` reported that no workspace owns the project, gave no
  reason, and suggested recording an owner unverified. Both now report
  the error for the workspace concerned, and list-projects no longer
  says that a workspace has no projects when it could not be queried (it
  also said so after an HTTP error).
  Gain: An operator whose token is refused is told so, instead of being
  sent to create a project or to record an unverified owner. The
  list-projects handler went from cyclomatic complexity 41 to 38, under
  the ceiling of 40, so its complexity exemption is deleted: one
  grandfathered function fewer. list-projects had one test and now has
  six.

- `bgagent linear setup` decides whether a workspace's stored webhook
  signing secret is its own by comparing it with the stack-wide secret.
  It read the stack-wide secret twice and ignored a failure of the
  second read, so the comparison ran against nothing, a secret copied
  from the stack-wide one passed for the workspace's own, and the
  registry recorded it as owned. The stack-wide secret is now read once,
  by one function that returns its value, and a failed read stops the
  command.
  Gain: A throttled or failed Secrets Manager call can no longer turn an
  inherited secret into a recorded proof of ownership, the record that
  lets the webhook receiver accept deliveries signed with that secret.
  One GetSecretValue call fewer per setup run on a stack whose
  stack-wide secret holds a real signing secret (the only stacks on
  which it was read twice), and 8 lines of product code fewer.

- `bgagent linear setup` looks the workspace up in the registry to learn
  whether it is on the Identity vault, and refuses to move such a
  workspace back to stored tokens. A lookup that failed was treated as
  'not registered', so with a throttled or denied read the refusal did
  not run and the command rewrote the registry entry without the vault
  binding. A failed lookup now stops the command, before anything is
  written and before `--code` uses up a saved consent.
  Gain: The guard against silently moving a workspace off the Identity
  vault holds when the registry cannot be read, and a failed read costs
  the operator nothing but a second try.

* fix(api): limit what the server behind a URL attachment can do to a task

- A link attached to a task is downloaded by the orchestrator while it
  prepares the task. When the server behind the link answered 204, 205,
  304 or a status outside 200-599 (999, for example), the…
ClintEastman02 pushed a commit to ClintEastman02/sample-autonomous-cloud-coding-agents that referenced this pull request Nov 24, 2026
* fix(agent): detect two more mise missing-task errors as an inert gate

is_verify_command_inert tells a build or lint command that could not
run from one that ran and failed. Of the ways mise words a task that
does not exist, it knew "no tasks defined" and "task not found:". The
wording depends on what else the repository defines. Where there is no
task at all and the name resembles one of mise's own commands (`lint`
does, `build` does not), mise says "unknown command: lint"; where other
tasks exist, it says "no task <name> found". Both were read as a failed
run. A repository without a mise lint task got a red lint baseline and
lint_passed=false on every task. A repository with mise tasks but no
`build` task got no warning that build-regression gating is off, and
build_passed=false on its tasks, which the platform takes for a failed
build in its reply to an iteration and in the release of dependent
sub-issues.

The detector accepts both wordings on mise's own error line, as it does
for "not found" since #1052. Elsewhere in the log the words are no
signal: pip says "unknown command" inside a task that ran, and mise
warns "no task <name> found, but a non-executable file exists" before
it makes that file executable and runs it. The task name is matched as
one word, so the search stays linear in the length of a line of build
output.

For a repository that configures no command and has no such mise task,
setup records the gate as inert, and the existing inert paths apply; no
message text changes. The two INERT notes reach the agent under "Setup
results" in its prompt. Lint is not run again after the agent and is
stored as passed. The post-agent gate classifies the same output as a
command that could not run, as it does for the other missing-task
signals, and no build result is stored, which the platform does not
take for a failure.

A pull request that the platform opens carries the gating-off warning
and "NOT RUN" for the build. One that exists already gets neither from
the platform, which leaves its description as it is: that is the case
when the agent opened it itself, as its prompt tells it to. The issue
expects the warning there as well; this change does not add it.

The tests feed the detector the verbatim output of mise 2026.8.4 (the
issue's) and 2026.11.6 (the version the agent image pins), and run
setup_repo for both repository shapes.

Refs #749

* docs(tooling): harden /review_prs sketch against json-string args (#670)

The Stage-2 Workflow sketch of /review_prs iterates the PR descriptors
with args.map(). When args reaches the script as a JSON-encoded string
instead of the array, a string has no .map and the script throws before
any review agent spawns. The sketch is regenerated on every run, so
every run can hit this again.

The sketch parses args when it is a string and iterates the result; an
array is used unchanged. The Stage-2 bullet that tells the script to
read args says that the script must normalize it first, and why. No
other line changes: the sketch stays an illustrative sketch.

Closes #670

* fix(agent): latch a blocked host only from network tool output (#551)

The egress detector reads the result of every tool call. When a
failed-connection signature named a host, it wrote the agent_blocked
event and also latched BLOCKED[egress_denied] as the terminal reason,
whichever tool had returned the text. A Read or a Grep of a log that
quotes "Could not resolve host: foo.com" was enough: when the task
later failed without a reason of its own, for example at the build
gate, it was reported as an egress denial, with the remedy to
allowlist a host it had never called.

The detector sets the latch only from the two results in which a
failed connection of the task itself shows: the output of a Bash
command, and the error of a WebFetch call that failed. Bash and
WebFetch are the two built-in tools through which a task opens
outbound connections. A fetch that completed has reached its host,
and what it returns is the page: content, like a file. In the pinned
CLI a fetch that cannot connect is a failed call. MCP tools are left
out on purpose: their result is text handed on from a server. Repo
setup and the fail-closed policy path set the latch as before.

The issue offers to gate the detection or the latch. This gates the
latch only, so the live agent_blocked event is still written for
every tool.

What changes for an operator: a failed task whose only egress signal
came from another tool, or from a fetched page, ends with its own
reason instead of the non-retryable egress verdict. In return, a
blocked connection that only such a result shows no longer becomes
the terminal reason; the event still names the host. In the pinned
CLI that is the case for a command that runs in the background, or
is moved there at its timeout: its output goes to a file, and a
failure that the task sees only by reading that file with the Read
tool is not latched.

The comment at the latch states what it depends on: a process runs
one task at a time, which holds because every task gets its own
compute session. Before the execution model lets tasks share a
process, the latch has to be keyed by task id.

Item 3 of the issue (no live producer for the auth_failure remedy of
a resource that is not an ARN) asks for no action.

Closes #551

* fix(setup): show preflight and build errors on the failure screen

When `mise //cdk:deploy` fails before CloudFormation starts, `bgagent
setup` lists the last error-looking lines of the output under "Cause".
mise ends a failed task with `[<task>] ERROR task failed`, which reads
as an error, while the bootstrap preflight's `bootstrap preflight:
FAIL: ...` matched none of the words searched for. The Cause was
mise's line alone, and the real message was only in setup-deploy.log.

A line that contains `fail` in any letter case counts as an error
line. That covers the preflight's `FAIL:` and the `[N%] fail: ...`
reason the CDK prints when an asset build or publish fails, which
stayed hidden behind `Failed to publish asset`. mise's closing line is
never listed, also when no line looks like an error and the last
lines of the output are shown instead: it names the task, not the
cause.

The helper is shared, so the screens of a failed `cdk diff` and of a
failed account preparation change the same way. A screen that listed
fewer than three error lines beside mise's line shows one earlier
line in its place.

The standard-bootstrap failure the issue was opened for is fixed
since #973; this is the remainder its comment narrows it to.

Closes #1020

* fix(tooling): enforce the license header on cli shebang files (#172)

cli/eslint.config.mjs switched license-header/header off for
src/bin/**, so cli/src/bin/bgagent.ts, the one file of the package
that starts with a shebang, could lose or change its header and lint
would still pass.

The override worked around the parser, not the rule. The rule accepts
a shebang above the header, but it looks for the shebang among the
comments, and only the text ESLint hands the parser has it as one.
Started from the command line without --fix, @typescript-eslint/parser
infers a single run and takes each syntax tree from the file on disk
instead, where the header looks misplaced. With the override gone and
nothing else changed, `mise //cli:eslint:check` fails with
"Superfluous new lines before license header" while the --fix lint of
the build passes.

Remove the override and set disallowAutomaticSingleRunInference, so
the check-only lint parses the text the --fix lint parses. A shebang
file is reported when its header is missing, altered or not exactly
one blank line below the shebang, and --fix puts the header back and
keeps the shebang. bgagent.ts already has that layout and is not
changed.

The option turns off the parser's single-run shortcut for the cli
check-only lint; the --fix lint never used it. The run takes about as
long as before: the difference stays within a few tenths of a second.

Two tests in cli/test/eslint-config.test.ts: a table of shebang
snippets linted as src/bin/a.ts, and a run of the check-only command
line on src/bin. The second is what lets CI see a missing parser
option, because the build lints with --fix.

Closes #172

* fix(security): default the gitleaks range scan to head, not every ref

`security:secrets:range` gave gitleaks an empty --log-opts when
GITLEAKS_RANGE was unset or empty. gitleaks does not read that as "no
range": it walks every ref of the clone, so the task failed on what
other branches hold. Measured on a developer clone: 2900 commits and
16 findings, none of them in the history of HEAD, where the sweep
scans 362 commits and finds nothing. The fallback was written in #330,
when the sweep itself was a bare `gitleaks git .`; #728 moved the
sweep to HEAD and the fallback stayed behind.

Without a range the task scans the history of HEAD, the scope of
`security:secrets`. A range that is set reaches gitleaks unchanged, so
the per-PR and merge-queue check behaves as before, and
GITLEAKS_RANGE=--all still scans every ref for whoever asks. The
default is not origin/main..HEAD: on main that range is empty, and
where origin/main is missing gitleaks scans nothing and exits 0.

New tests in cdk/test/scripts/mise-tasks.test.ts run the three
gitleaks commands with a shell function in place of the binary. They
hold the default for an unset and for an empty variable, the
pass-through of a range, and the same rule file, redaction and output
flags in the sweep, the range scan and the staged scan.

The comment on the merge-queue range in
.github/workflows/security-pr.yml follows: without a range the task
scans the history of HEAD, and it is gitleaks itself that walks every
ref when it is given an empty range.

Refs #329

* fix(cdk): give each integ run its own assertion stack

integ-runner deploys two stacks per run: the stack under test and a
second one that holds the assertions. Only the first took its name from
INTEG_STACK_NAME (`int-<sha>-<run>` in CI). IntegTest named the second
after its construct path, TaskApiSmokeDefaultTestDeployAssert413BE3D6,
so every CI run, and a local run in the same account and region,
created, updated and deleted that one stack. Integ runs are keyed per
pull request since #1047, on the ground that stack names are
run-unique: two approved runs can be in the account at the same time,
and a copy left behind by a cancelled run is what the next run meets.

The app passes IntegTest an assertion stack of its own, named
`<stack name>-assert`: `int-<sha>-<run>-assert` in CI, which keeps the
`int-` prefix that marks a stack as ephemeral, and
`backgroundagent-integ-local-assert` on the local path. The template of
the stack under test does not change, and the assertion stack holds the
same resources and outputs.

A unit test synthesizes the app in a child process, as integ-runner
does, and checks that the cloud assembly holds exactly the two stacks
named after the run, with and without INTEG_STACK_NAME. It needs no AWS
access.

Only an approved integ run can prove the deploy and the destroy of the
renamed stack on AWS. A stack named
TaskApiSmokeDefaultTestDeployAssert413BE3D6 that an earlier run left in
an account is not picked up by later runs: delete it once by hand.

The issue stays open for the offline `cdk diff` for the approver and
for a teardown that does not fail the run.

Refs #400

* fix(agent): gate the arn-pinning constants and correct stale comments

The agent checks the ARN values of a MicroVM platform_config block
against two constants read from contracts/constants.json: the keys to
check (arn_keys) and the key that anchors them (account_anchor_key).
The constants drift gate owned neither, so a literal re-declaration of
either under agent/src passed check:constants-sync and would have
stopped following the contract.

Both names are in OWNED_PYTHON_NAMES, with their value-parity rows in
agent/tests/test_constants_parity.py (the gate refuses an owned name
that test does not compare). An assignment to either that is not a
plain read of its contract key fails the gate; the gate reports 17
Python names instead of 15.

Thirteen comments and docstrings contradicted the code. They state
the facts instead: the Region is not compared because the execution
role's Secrets Manager grants are Region-scoped, not account-scoped;
a boto3 session frozen into a snapshot carries the build role's
credentials, not its region; the build role has a Logs grant, scoped
to /aws/lambda-microvms/*; and ECS is left out of the heartbeat check
as a hard constraint, not a preference. Three of them said that the
agent writes its heartbeat every 45 s on every compute backend (the
doc comment of agent_heartbeat_at in the API types and its CLI mirror,
and a test comment): on ECS it is written once at start, as
API_CONTRACT.md says. No runtime behaviour changes.

Refs #817

* test(cdk): screen real pdfs with the installed pdf-parse

The defect of #683, the v1 call shape against pdf-parse v2, was fixed
by #695, which also made the mock a PDFParse class. One ask of the
issue stayed open: a test with a real PDF, so that a later API
mismatch fails loudly. The mocked suite cannot give that. It proves
that the code matches the mock, not that the mock matches the
package.

The new test runs the real screenTextFile with the installed
pdf-parse on PDFs built in memory. Only the guardrail call is a stub.
The text of every page of a two-page PDF has to reach the guardrail,
and a 51-page PDF has to be refused by the page limit. Against the
source as it was before #695, both tests fail with "TypeError:
pdfParseFn is not a function".

The screening runs in a child process, on an esbuild bundle in the
shape of a Lambda bundle (CommonJS, pdf-parse left in node_modules),
because under Jest pdfjs cannot import() its ES module worker. Two
comments of the mocked suite said that real extraction is validated
on the live deploy. They name the new test instead.

No production code changes. The cdk suite gains about one second.

Closes #683

* docs(onboarding): say arm64 emulation does not survive a reboot

On an x86_64 host the arm64 agent image builds only under QEMU
emulation. The Quick Start and the /setup and /deploy skills tell the
deployer to register it with `docker run --privileged --rm
tonistiigi/binfmt --install arm64`, and all three presented that as a
one-time step. The registration is kernel state (binfmt_misc), not a
setting saved on disk, so it is gone after a reboot, and stopping and
starting a cloud dev box is a reboot. A host that deployed before then
fails again with `exec /bin/sh: exec format error`, and no document
said why.

The Step 3 caution and the "Common errors" row of the Quick Start
state the lifetime and the remedy: run the command again, which is
harmless to repeat because the tool leaves an existing handler as it
is. They offer a native arm64 host to readers who would rather not
register after every reboot. The /setup skill no longer says
"One-Time" or "once per host", the /deploy skill no longer says
"once", and both tell the agent to run the command again after a
restart. That is the command the skills already run, not a new one.

The text names a reboot only. The issue also names a Docker daemon
restart and proposes distribution packages for a persistent
registration; its only comment disputes both and neither could be
verified here, so neither is documented. The structural fix the issue
prefers, building the image on a native ARM64 builder, stays open.

Refs #571

* chore(project): clear the deprecation warnings the build still prints

The two warnings the issue names (ts-jest TS151002 and
GrantOnPrincipalOptions#scope) no longer appear, but the build of main
prints the same class of notice at five other sites. Each of them
becomes a break when the deprecated API is removed.

- TaskOrchestrator created its `live` alias with Version#addAlias. It
  constructs the Alias itself, under the same scope (the current
  version) and id, so the alias keeps the logical ID that deployed
  stacks hold. Function#addAlias, the other replacement the notice
  names, would move it to a new logical ID, and CloudFormation would
  try to create a second alias named `live` before it deletes the
  first. A test pins the logical ID.
- EcsAgentCluster passes containerInsightsV2: ENABLED instead of
  containerInsights: true. The cluster setting is the same, and the
  AwsSolutions-ECS4 suppression reason names the prop in use.
- Two test fixtures: Stack#addStackDependency instead of
  addDependency, its former name, and a nodejs24.x function instead of
  a nodejs20.x one, which CloudFormation Validate reports as
  deprecated.
- The docs site hands its remark plugins to
  `markdown.processor: unified({...})`. Astro 7 builds that processor
  from the legacy `markdown.remarkPlugins` key and warns.

No behaviour changes. The synthesized templates are byte-identical
except for one cdk-nag metadata string on the ECS cluster (the
suppression reason), and the built docs site is byte-identical.

The process the issue proposes, capturing the warnings of the build or
failing it on new ones, is not part of this change.

Refs #192

* docs(security): record fail-open content-screening posture as an adr

The Jira and Linear webhook processors drop advisory enrichment that
is blocked or cannot be screened (recent comments, Linear project
documents, a sub-issue's own files in a Linear epic) and do not
reject the task for it, while content that specifies the task fails
closed. That rule was written out in three suppression comments and
in no document, although vision tenet 4 asks for an ADR where a path
degrades.

ADR-026 states the rule and its threat model once, with its
requirements in EARS form as ADR-020 asks. SECURITY.md links it and
the three suppressions cite it. No behaviour changes.

The issue speaks of about four call sites. The triage it quotes
counts a fourth site that was already suppressed, and the only one
of that kind is the fallback for a failed comment fetch in
jira-attachments.ts. A failed fetch is no screening decision, so it
is outside the record and that suppression keeps its own reason.

A new ADR instead of a section in ADR-009: ADR-009 covers
development-time agents and is still proposed. ADR-025 is claimed by
two open pull requests, hence 026. Its status is accepted: the
behaviour it records has shipped. The record lists a sub-issue's own
files as a third advisory kind that the issue does not name, because
the code drops them the same way, and names that path as an exception
to the principle that attachments are never silently dropped.

Closes #793

* feat(api): include webhook_url in the create-webhook response (#57)

POST /v1/webhooks returned the webhook id and the one-time secret but
not the URL the external system has to post to. A caller had to know
the route (/webhooks/tasks), find the API URL in the CLI config and
join the two by hand, once per environment.

The 201 response carries webhook_url. The handler builds it from the
host and stage the request came in on: API Gateway serves every route
of the API there, so no template, IAM or table change is needed. The
URL belongs to the API deployment, not to the webhook, so every
webhook gets the same one and the list and revoke responses do not
repeat it. The Host header is read in any letter case. A request
without one gets a 500 before the secret or the table item is
created, rather than a malformed URL; API Gateway always sends the
header.

bgagent webhook create prints the URL and a one-line hint between
"Created:" and the secret, which stays the last line. --output json
passes the field through, and --help says the URL is the same for
every webhook and need not be fetched again. Against an API deployed
before this change the text output is unchanged and the JSON has no
webhook_url until that stack is deployed again.

With a custom domain the URL is right when the API is mapped under
the stage name (/v1), the form the API contract documents.

Closes #57

* fix(observability): notify the alerts topic from every alarm (#686)

The stack deploys its CloudWatch alarms and one SNS topic for them
(OperationalAlerts). The alarms published to the topic, except the two
Lambda error alarms: the orchestrator's OrchestratorErrorAlarm
and the screenshot processor's WebhookProcessorErrorAlarm changed
state without telling anyone, so a failing orchestrator was visible
only to someone already watching the CloudWatch console.

Pass both to operationalAlerts.addAlarmActions, next to the alarms
that were already there. Every alarm of the root stack is in that one
call, and a stack test fails on any alarm of the stack's default
template that does not list the topic. An alarm in a nested stack, or
one that only a non-default feature deploys, is outside that test.

For operators: a subscriber of the topic receives two more kinds of
notification, on the transition into ALARM only. The orchestrator
alarm needs 3 or more errors in each of two consecutive 5-minute
periods; the screenshot processor alarm needs one error in a 5-minute
period, and a fault that also exhausts the async retries notifies
twice (Errors, then DLQ depth). With no subscriber, the default,
nothing is delivered.

The deploy updates the two alarms in place and changes the description
of the OperationalAlertsTopicArn output. No resource is added or
replaced, and the topic and key policies already admit every alarm of
the account and Region.

Docs: OBSERVABILITY.md says which alarms notify and how to subscribe,
the screenshots guide says its two alarms notify, and the stack-output
table describes the topic as it is.

Closes #686

* fix(slack): resolve a pasted github link in a mention to its repo

A GitHub link in a mention was read as slash words: the host and the
first path segment became the repo. Without a channel default,
"@Shoof fix https://github.com/org/repo/issues/42" was refused with
"Repository 'github.com/org' is not onboarded"; with a default the
task started on the default, without the issue.

The command processor reads a link whole, in the three forms it can
arrive in: <url> and <url|label> as Slack delivers them, and bare
text. A GitHub link to a repo, an issue or a pull request names
owner/repo and carries the number as issue_number. It counts like
owner/repo#42: the first such reference of the message decides, it
wins over the channel default without a RepoTable read, and a linked
repo that is not onboarded gets the "not onboarded" answer instead of
a task on the default. A clone address (.../repo.git) names the repo
without the suffix. Any other link names no repo and none of its
parts is read as word/word: another site, gist.github.com included,
or a file, a branch or a workflow run on GitHub. The link that named
the repo leaves the description as the word does, label included. A
message without a link is read as before.

What users of a channel with a default repo will notice, and anyone
who names an onboarded repo after a link: the first GitHub repo,
issue or pull request link decides wherever it stands, also inside
pasted output or a diff. The task starts on the linked repo when that
one is onboarded and is refused with "Repository '<linked>' is not
onboarded" when it is not. These started on acme/api and are refused:

- default acme/api, a pasted log line "npm ERR! see
  https://github.com/npm/cli/issues/4828 for details";
- default acme/api, a pasted diff that holds
  "url: https://github.com/old/charts";
- "bump flask, see <https://github.com/pallets/flask/issues/5000> in
  acme/api".

The guide gives the way out: write the onboarded repo the task is for
before the link. Treating a link as certain, like owner/repo#42, is
the choice made here. Reading it as certain only when its repo is
onboarded would leave those three messages as they were, and would
start a task on the default when the linked repo is not onboarded.

Known limits:

- A typed repo link that Slack did not wrap (in a code span) is not
  recognised when a backtick or a closing parenthesis follows it, and
  is read with a full stop that follows it.
- A label the user wrote on the link is dropped with the link.
- A link into an issue or pull request (a comment, the files tab)
  gives the number; the place it pointed to is not passed on.
- When owner/repo stands as a word before its own issue link, the
  word decides and the number is not carried. A repo link before
  owner/repo#N of the same repo wins, and the number stays in the
  description.
- A GitHub address of two path segments that is no repo
  (/settings/tokens) is read as one and refused.

Closes #850

* fix(api): return 409 when a slug names several active workspaces (#883)

DELETE /v1/linear/workspaces/{slug} found the workspace with a filtered
scan that stopped at the first active match. When more than one active
registry row carried the slug, it removed whichever row the scan read
first and answered 200, while the other rows stayed active. When
different admins had installed the rows, the answer was 403 or 200
depending on the order of the table.

The scan reads to the end of the registry, within MAX_SCAN_PAGES, and
collects every match. More than one active row for the slug is refused
with 409 WORKSPACE_SLUG_AMBIGUOUS: nothing is written and no secret is
deleted, with or without purge=true, and the message names the
linear_workspace_id of each of those rows. The CLI prints the message
and the code as it does for any API error, so it does not change, and
neither does the success response.

For review:
- The 409 comes after the admin check. A caller who installed none of
  the rows gets the 403 that a single row gives, without the ids; the
  admin of any of the rows gets the 409.
- The caller's own row is not removed alone, because the rows share
  the secret that the slug names.
- Only active rows count. With no active row for the slug, the revoked
  row read first is removed, as it was.
- A scan that reaches the page cap with pages left answers 500 also
  when it has read an active row: the unread pages can hold a second
  one. The registry holds one row per workspace, far below the cap.
- The endpoint takes no linear_workspace_id parameter, which the issue
  leaves open. The Linear setup guide documents the code and how to
  resolve it by revoking a row by id, and the message of the 409
  refers the operator to it.

Closes #883

* fix(agent): fail closed when the registry .mcp.json could reach a commit

The registry loader writes the resolved mcp_server config, which may
hold secrets, into the clone's .mcp.json and then has git leave that
file out of commits. In two cases the config could still reach a
commit, and with it the pull request:

- The repository commits .mcp.json as a symlink. The write followed
  the link, so the config landed in the link's target, a file the
  commit guard does not cover.
- The guard did not take. When `git update-index --skip-worktree`
  failed (index.lock held, unmerged index entry) or a git call raised,
  the loader logged a warning and went on to report a successful load.

apply_mcp_assets now raises RegistryAssetLoadError in both cases, so
the task fails before the agent starts and nothing is committed:

- A symlinked .mcp.json is refused before it is read or written (the
  check the issue proposes, not O_NOFOLLOW: the error names the cause,
  and nothing is read through the link either).
- The guard no longer trusts the exit code of update-index. It reads
  the flag back with `git ls-files -v` and raises when the flag is not
  set, or when a git call fails or times out. Only skip-worktree
  counts; an entry that is merely assume-unchanged does not. A
  .mcp.json that the repository tracks, or that its .gitignore
  re-includes, in a clone with sparse checkout enabled ends in the
  same refusal, and so does a directory outside a repository.

Either mechanism of the guard (the clone's exclude file, or
skip-worktree) also keeps the agent's own edits of .mcp.json out of
its commits, and git names a .gitignore file or a sparse-checkout
definition as the cause. The loader now logs one TASK line that names
the file as platform-managed for the task, and switches off git's
advice for the skip-worktree refusal as it already does for the
ignored file. The edits themselves are still left out: #760 stays
open for the redesign that lifts that limit.

For operators: a task whose Blueprint pins a registry mcp_server now
fails at start where it used to run, when .mcp.json is a symlink, or,
where the repository tracks .mcp.json or its .gitignore re-includes
it, when index.lock is held, the entry has an unresolved merge
conflict, or sparse checkout is enabled in the clone. Where the
clone's exclude file keeps the file out (the repository has no
.mcp.json and does not re-include it), no index entry is needed and
the last three do not fail the task. docs/design/REGISTRY.md describes
the guard and these failures.

Tests that used a plain directory as the clone now run in a git
repository, as a task does (test_registry_loader.py, and the
agent_step fixture of test_pipeline.py).

Closes #758
Closes #759
Refs #760

* test(cdk): hold the deploy task to deploy.yml, test its bootstrap check

The deploy job of deploy.yml runs `npx cdk deploy` on the assembly that
build.yml synthesized, so the pipeline does nothing of what
`mise //cdk:deploy` does before it deploys unless the workflow has a
step of its own. Nothing at the task said so, and nothing failed when
the task gained a step: the bootstrap preflight that #976 made its
first command has no counterpart in the pipeline.

The comment on [tasks.deploy] says that the pipeline does not run the
task, and what the pipeline does instead for each entry in front of
`cdk deploy`. test/scripts/deploy-workflow.test.ts holds the task to a
table of its dependencies and commands, each with its step in
deploy.yml or with none.

The test fails when an entry of the task is added, removed, moved or
changed and the table does not follow. A command is compared whole,
with the argument template that ends it, because mise also runs a
default written in the template and whatever follows it. The test
fails as well when the task holds anything it does not read: another
key, a string that is not double-quoted, or a sub-table, whose header
it recognises with or without indentation, spaces and quoted keys.

It fails when a recorded step is no longer in the workflow: the
log-delivery check with --check-only in the diff job, and
`npx cdk deploy --app cdk/cdk.out` in the deploy job. And it fails
when a step of the workflow runs a preflight that the table does not
record for it. The bootstrap preflight is recorded as not run by the
pipeline, so the test holds that until the step is recorded; whether
deploy.yml gets that step is left to #127.

test/scripts/preflight-bootstrap.test.ts runs the bootstrap preflight
as the task does, as a subprocess with a fake `aws`. Its exit code is
what keeps `cdk deploy` from starting, and no test ran the script. The
suite pins exit 0 on PASS and WARN, exit 1 on FAIL and on a state the
script cannot read, the --json output, the one DescribeStacks call
with --profile and --region, and the compute backends read from the
context arguments and from cdk.json, where the last argument wins. It
also pins the bypass: ABCA_SKIP_BOOTSTRAP_PREFLIGHT=1 lets the deploy
start without a call to AWS, and the check runs when the variable is
not set or has another value.

No behaviour changes: the edit of cdk/mise.toml is comments only. Two
sentences of the same comment called the log-delivery preflight the
first command of the task; the bootstrap preflight is.

Refs #843
Refs #127

* docs(bootstrap): document bootstrap tasks, preflight and versioning

The least-privilege bootstrap shipped without the documentation that
issue #128 lists. The root AGENTS.md did not mention bootstrap, the
command list of cdk/AGENTS.md had none of the three tasks and the file
had no entry for cdk/bootstrap/, and the deployment guide had no section
on bootstrapping, although the preflight's failure message sends
operators to that guide.

AGENTS.md routes bootstrap-policy and preflight changes to
cdk/src/bootstrap/ and names what moves with them: the generated
artifacts, the golden JSON in DEPLOYMENT_ROLES.md, the hash snapshot and
the bundle version the CLI requires. cdk/AGENTS.md lists the three
tasks, both directories and the scripts the tasks run, and the mistake
of editing an artifact by hand, with the tests that catch it.

The deployment guide gains "Bootstrap with least-privilege": an account
with no bootstrap, the ComputeTypes parameter, an account that already
has a bootstrap, and the preflight with a remedy for each result. It
says what the preflight leaves unchecked: a compute backend that only a
deployment profile selects. Replacing a standard CDK bootstrap is shown
with --force, because the CDK CLI otherwise changes nothing and exits 0
(#701); the setup section gives the same command. The section says what
the replacement means for the other CDK apps of the account and Region,
and that --force also lets the CLI downgrade a newer CDK bootstrap
version. It explains the "Using default execution policy of
...AdministratorAccess" line the CLI prints during a bootstrap: that
line describes the standard template, not this one.

DEPLOYMENT_ROLES.md gains "Versioning": the three CDKToolkit outputs,
where each comes from and what it answers. They describe the template
that was deployed, not what is attached to the execution role, and the
section says so. The preflight table moves from there to the guide.

The command in DEPLOYMENT_ROLES.md that sets ComputeTypes did not run
as printed: its value was unquoted, so the shell removed the backslash
that escapes the comma, and the AWS CLI rejected the value as a list.
With the escaping repaired it named only ComputeTypes, and
CloudFormation sets every parameter that an update leaves out to its
template default. The block now quotes the parameter, reads the names
of the stack's other parameters and names each with UsePreviousValue,
which is the update `bgagent setup` makes. It sends the update only
when it could read them, so that a read that fails, for example
because --profile was given to the update alone, cannot leave an
update that names ComputeTypes alone. The comment in that block loses
its backticks: pasted into a zsh that does not treat # as a comment at
the prompt, the macOS default, the block ran `cdk bootstrap` from
them. The Lambda MicroVMs section of the guide passed --parameters to
`aws cloudformation deploy`, which has no such option; that step links
to the new section instead.

The comment above the bootstrap task in cdk/mise.toml carried a third
copy of the old command, and the task's description sends operators
there. It points to the section of DEPLOYMENT_ROLES.md instead.

The JSON policy blocks of DEPLOYMENT_ROLES.md stay. They are the
baseline that cdk/test/bootstrap/golden-baseline.test.ts reads by
position, so the issue's request to remove them is not met.

Refs #128

* fix(agent): screen turn, tool-call and error events for credentials

Of the events the runner writes, only tool results were screened. The
model's thinking and text, the input of a tool call and the text of an
exception that ends the session went into the task's events as they
were, and from there to `bgagent watch`, the web console and the Slack
notice of an agent error.

The runner screens each of these texts the way it screens a tool
result, and before the progress writer cuts it to a preview: what the
output scanner or the redaction of log lines takes for a credential is
replaced by a marker. The text of a session error is screened once,
for the event and for the task's error message, which the failure
notice quotes.

A tool input is recorded as the repr of a dict. Its strings are
screened first, because a repr escapes the quotes, tabs and newlines
the patterns rely on. The repr as a whole then passes the scanner
only, for a secret that only a key and its value show together: the
log redaction replaces up to the next blank, which in a repr takes
the quote and the comma that close an argument, and the web console
reads the arguments back from that text. Tool results go through the
same helper. A string result is recorded as before; a result that is
a list of content blocks keeps what stands between a marker and the
next blank, as a string result does.

For operators: these previews show what tool-result previews and log
lines already show, false positives included. In a path or identifier
that contains `ghs_`, `ghp_`, `gho_`, `ghu_` or `ghr_` followed by
word characters, the rest of the word reads `***`
(`docs/walkthroughs_intro.md` becomes `docs/walkthroughs_***`), and
so does the value after `Authorization: Bearer` or `Authorization:
token`, a variable reference included. An input in which nothing is
found is recorded exactly as before. Event types and field names do
not change.

One part of #225. The policy per entity type, the audit record, PII
detection and the gate on pull-request content stay open.

Refs #225

* fix(security): scope gitleaks fixture allowlists to their rule and file

Two global allowlists in .gitleaks.toml exempted a test fixture by
stopword alone: the Slack signing secret of slack-verify.test.ts and
the idempotency key of orchestration-release.test.ts. With no `paths`,
no `targetRules` and no condition, each value passed the secret scan in
every file and under every rule, so a copy of either one outside its
test was not reported.

Each entry now names its rule (generic-api-key, the only rule that
reports the fixture) and its one test file, and sets
`condition = "AND"`. Without the condition gitleaks ORs the criteria:
the value would still be allowed everywhere, and every finding of the
rule would be allowed in the listed file. The history of HEAD still
scans clean. Either value in another file is reported, and so is a
secret in the two test files that does not contain the fixture value.

A comment above the entries states the convention, and the new suite
cdk/test/scripts/gitleaks-config.test.ts holds it: every global
allowlist lists its files in patterns anchored at both ends, and one
that exempts a value or a commit also names its rule and requires every
criterion. No JavaScript workspace declares a TOML parser, so the suite
reads the file as text and fails on a line in any other TOML form than
the one the file uses: gitleaks reads those forms too, and names in any
letter case, so an entry written that way would go unread. The file as
it is would pass a looser reading as well, so a second block gives the
same reading small configs that it has to refuse.

When a listed file moves, its old path has to stay in `paths` next to
the new one: the history scan reads each commit under the paths of its
time.

Refs #328

* test(ops): pin which stacks the ephemeral cleanup script deletes

scripts/cleanup-ephemeral-stacks.sh deletes CloudFormation stacks and
had no test: nothing held which stacks it selects, which it leaves
alone, or how it fails.

The suite runs the real script with a fake `aws` on PATH that answers
from a fixture and logs every call. The script deletes whatever its
`aws` reaches, so the suite starts it only when a bash that is started
the same way resolves `aws` to that fake. Where it does not, the tests
fail with that reason and the script is not run; one test holds that.

The suite holds that:

- an ABCA stack older than the default 48 hours is deleted, with or
  without the solution id in its description, and one in DELETE_FAILED
  is deleted again;
- the listing asks for the stacks that are complete, rolled back or
  failed to delete, and for no other state;
- a stack with termination protection, a younger stack, one whose
  creation time cannot be read and one that is in progress when it is
  described are left alone, each with its reason printed and counted;
- a stack of another application, the network stack of the same
  application and a stack without a description are left alone;
- of a stack that is left alone only the description is read, and a
  dry run stops once it has described the stack;
- --prefix limits the sweep, --max-age-hours replaces the default max
  age and --region is the region of every call;
- a refused deletion does not end the run, and its error is shown;
- a failing list-stacks and a failing identity call end the run with
  exit 1, and an unknown option or an invalid --max-age-hours is
  rejected before any AWS call.

One test reads cdk/src/main.ts: it fails when the application stack
gets another description than the one in the fixtures, which is the
text the script selects by.

Left out on purpose: the forced detach of network interfaces, which
issue #72 records as unable to release the interfaces AgentCore holds
and due to be replaced, and the exit code after a refused deletion,
which depends on that replacement. Not held either: --max-age-hours 0,
a stack that cannot be described, whether a stack with another
description is counted, and MAX_AGE_HOURS and AWS_DEFAULT_REGION read
from the environment, which the suite empties.

The script is unchanged, so every test passes before and after this
commit. Each test was seen to fail against a copy of the script, of
main.ts or of the suite's own start-up check with the line it guards
changed. The fake starts node for every `aws` call, 93 times in a run,
which is where the run time goes: 8 to 19 seconds on a development
laptop, depending on its load.

Refs #72

* fix(observability): sanitize a non-bmp character to one dash in ua.ts

agent/src/ua.py, cdk/src/handlers/shared/ua.ts and cli/src/ua.ts must
sanitize a label identically (AGENTS.md, #319), and the vectors of
contracts/ua-vectors.json hold them to it. One case had no vector, and
in it the modules disagreed: a character outside the Basic Multilingual
Plane. The two TypeScript modules matched UTF-16 code units and wrote
two dashes for it; the Python module iterates characters and writes
one. For "a", U+1F600, "b" that is a--b against a-b.

The regular expression of both TypeScript modules takes the `u` flag,
so it matches by code point and writes one dash. That is the contract's
own rule: every character outside the token alphabet becomes '-'. The
contract gains a fourteenth vector for the case, its input written as a
JSON surrogate-pair escape so that the file stays ASCII. The three
suites load the vectors themselves and need no change. Without the flag
the vector fails the cdk and the cli suite (expected a-b, received
a--b); the agent suite passes it either way, because its module already
does what the other two do with the flag.

Nothing else moves: the thirteen existing vectors pass unchanged, a
lone surrogate stays one dash in all three modules, and no value sent
today differs, since every component label in use is an ASCII constant.

Not covered: the app-id value built in
cdk/src/constructs/solution-ua-aspect.ts. It has its own copy of the
expression, no counterpart in another language and no vector, so a
character outside the Basic Multilingual Plane in an app-id override
still becomes two dashes there.

Refs #719

* fix(agent): run a build command shlex cannot split through the shell

A build or lint command without a shell operator is split with shlex
and started directly. shlex raises on a quote that is never closed and
on a trailing backslash, and nothing caught the ValueError: a coding
task failed during setup, before the agent ran, and a review task,
whose setup runs no baseline, failed in the gate after the review. The
blueprint stores the command unchecked, so one typo did that to every
task of the repository.

The same text beside a shell operator goes to `bash -lc`, where a
quote that is never closed is a syntax error with exit status 2: a
failed baseline or gate, not an exception. resolve_verify_argv sends a
command that shlex cannot split there as well, so both forms behave
alike, as they do since #1052 for a program that is not installed.
What a trailing backslash becomes is the shell's decision; its exit
status is the result either way.

The asks of the issue were met by #1052. This is an adjacent input
that still ended a task before the agent started.

Refs #750

* test(registry): cover the 502 a stranded record gives the publisher

When a publish fails after its record was created, the handler answers
502 REGISTRY_PUBLISH_INCOMPLETE with the record id and the adapter's
instruction to approve or delete the record before retrying. Publishing
the same version again is refused while that record exists, so this
answer is how the publisher learns which record has to be approved or
deleted.

No test executed that branch. With it removed the answer becomes the
generic 500, and all 46 tests of the two suites that load the handler
still passed.

Add one case that pins the status, the error code, the record id and
the instruction in the message. Test only, no product code changes.

The asks of #782 were met by #1052, which gave the publish function
28 s against a wait of 20 s for record creation but did not cite the
issue. This case covers the answer that change protects.

Refs #782

* docs(cdk): say that the dead-letter alarms notify the alerts topic

Four comments describe the notification channel of the CloudWatch
alarms as future work: the alarm property of FanOutConsumer and of
ApprovalMetricsPublisherConsumer, the comment on the publisher's
dead-letter queue, and the header of the publisher's handler. One
speaks of an action that "can be attached once a notification channel
is provisioned". The channel exists: AgentStack attaches the
OperationalAlerts SNS topic to both dead-letter alarms as their alarm
action (#629), and the stack tests pin it.

The two property comments state that in the present tense, so a
reader of either construct learns that the alarm notifies the alerts
topic and why the property is typed as the concrete Alarm class. The
queue comment ends at the alarm, whose own comment says the rest. The
handler's header keeps what holds for its metrics, that an alarm can
be defined on them; no such alarm exists, so it says nothing about
where one would notify. Comments only; the code is unchanged.

Two design documents said the same. Section 9.5 of
INTERACTIVE_AGENTS.md called alarm notification deferred for want of a
channel, and the status note of section 15 of CEDAR_HITL_GATES.md
listed the alarm plumbing as deferred. Both say what exists; what
stays deferred there are the additional alarms of section 11.5.

The required asks of #228 are met on main. Its optional OK action is
not implemented and is left to the maintainers.

Refs #228

* test(agent): pin that telemetry redaction keeps the text around a secret

The three tests for a secret in the error text of a METRICS_REPORT
event checked that the secret is gone and that its marker is there.
Both are also true when the whole message is replaced by the marker,
so the tests passed for a function that drops the readable text of
every error that holds a secret. Keeping that text is what #118 asked
for, and only the tests for errors without a secret pinned it.

Each of the three tests compares the whole logged value instead. The
comparison implies the two checks it replaces: a value that still
holds the secret, or lacks the marker, fails it as before. The
expected values are what main logs, so no product code changes.

Refs #118

* fix(bootstrap): apply the template to an already-bootstrapped account

`mise //cdk:bootstrap` did nothing on an account whose CDKToolkit stack
records another bootstrap variant, and exited 0. The CDK CLI does not
overwrite such a stack unless it is given --force: it warns and leaves
the stack as it is. A standard `cdk bootstrap` records another variant,
so the execution role kept AdministratorAccess and the ABCA policies
were never attached. The stack can keep the old variant value after a
forced bootstrap, so a later run without the flag did nothing again.
The deploy preflight names this task as the remedy, and `bgagent setup`
runs it and checks only the exit code.

The task passes --force. It replaces the bootstrap it finds: a standard
one, another variant, or a newer CDK bootstrap version, which the CLI
also declines to replace without the flag. A fresh account is
bootstrapped as before. On a bootstrap that is already current the CLI
prints its "You used the --force flag" warning and changes nothing.

Behaviour change for operators: on an account with a standard bootstrap
the task replaces it, and the other CDK apps of that account and Region
then deploy through the ABCA execution policies. A script that must not
replace one cancels the flag: `mise //cdk:bootstrap -- --no-force`.
`bgagent setup` still leaves a standard bootstrap unchanged.

DEPLOYMENT_ROLES.md covers the already-bootstrapped account: what the
task changes, what the kept variant value means for a later standard
`cdk bootstrap`, the execution policy list an earlier bootstrap may
have set, and how to check the role.

DEPLOYMENT_GUIDE.md gives the bare task for replacing a standard
bootstrap, and the Quick Start note and cdk/AGENTS.md say that the task
replaces the bootstrap it finds. The preflight message for a standard
bootstrap says that the remedy replaces it for every CDK app of the
account and Region.

The issue also allowed failing loudly on a variant mismatch. The flag
is the choice here because the tool's own remedies name the bare task,
and a stack that keeps the old variant value would fail on every later
run.

A test pins the flag in the task's command line.

Closes #701

* fix(agent): keep the stop-language of a deny when the reason is long

When a reviewer denies a gated tool call, the agent gets the reason
inside a fixed text: the rule that gated the call and the instruction
not to retry that class of action. The instruction stands at the end,
and the whole text was cut at 500 characters. The API accepts a reason
of up to 2000 characters, so a reason of more than about 220
characters cut into the instruction, and a longer one removed it and
the rule name altogether. The agent was then left with the bare
reason, which it answers with retries.

The cut now falls in the reviewer's reason: the names of the matching
rules, then the reason, are shortened to the room the fixed text
leaves, and escape sequences are removed before the cut, so that it
cannot split one. A text that fitted is unchanged, and so are the cap
of 500 characters and the wording. With the refused call the agent
sees about the first 200 characters of a long reason; the full reason
still follows in the <user_denial> block at the next Stop seam.

No test held the wording: with the rule name and the instruction
deleted, the suite passed. One test now compares the whole text.

The user guide says what a deny does: the instruction, the 60 seconds
in which the same rule refuses the same tool without a new request,
what a timed-out gate does not do, and when to approve instead. The
design document describes the rule-level cache entries and the text
that is returned.

Refs #113

* docs(registry): document the 443-only network reach of mcp servers

REGISTRY.md said nothing about the network an mcp_server asset is
reached from, although the registry bullet of the deployment guide
sends the reader there. The agent connects to the server from inside
the task's compute session, and on every backend (AgentCore, ECS and
Lambda MicroVMs) the runtime security group allows outbound TCP 443
only.

Section 2 gains a subsection, 2.1, that says so: an http or sse
server has to be served on port 443 and is not supported on another
port on any backend, the calls of a stdio server are bound by the
same rules, and neither publish nor resolution looks at the port or
tests connectivity, so a pin to a server the session cannot reach
resolves and loads, the task starts, and the agent cannot use the
server's tools. The rule and the DNS Firewall allowlist stay
described in one place, COMPUTE.md, which the subsection links to.

The issue took the restriction to be specific to lambda-microvm; all
three backends have it. Of the two options the issue leaves open, a
reachability check or a note, this is the note, as in the deployment
guide: nothing checks reachability at synth, onboarding or publish
time. The other asks of the issue are met on main: the test that
crosses the 4,096-byte hook limit through resolved_assets landed
with #904 (cdk/test/handlers/orchestrate-task-microvm.test.ts), and
the Lambda MicroVMs sections of COMPUTE.md and of the deployment
guide state the 443-only egress.

Closes #818

* test(agent): pin the server-test thread join and use distinct task ids

The race of #841 is already fixed: reset_server_state joins every
pipeline thread while the stubs of its test are still in place (#806)
and fails the test whose thread outlives the join (#1035). Nothing held
that in place. With the join deleted the file stays green in most runs,
because the thread usually finishes in time anyway, and the order "join
first, undo the stubs after" is inherited from conftest's _clean_env,
not stated by the fixture.

A new test runs pytest on a throwaway module of two tests, with the
fixture and conftest.py loaded as they are for this file. The first
test ends while its pipeline thread has not looked up run_task yet; the
second checks that the thread ran the first test's stub and never its
own. It fails when the join is removed and when the stubs are undone
before the join, both times with the failure the issue reports: a stub
called by a test that never made the call. The thread of that module
calls run_task only once it is released, so a run that stops between
the two tests cannot start a real pipeline. The nested run is started
without the caller's PYTEST_ADDOPTS: an option exported in a shell,
such as -k, would otherwise decide its result.

The three accepting tests of TestMicrovmRunHookPlatformConfig that
shared the task id t-pc pass their own. Every pipeline thread of the
file is started by exactly one test, so the name in a leak message
points at its origin.

Two boxes of the issue are not implemented as written. A join at
fixture setup has nothing to join: every test ends with its threads
joined or fails, no other file starts a pipeline thread, and none is
alive at the start of any of the 240 tests. The re-run of #680 is moot:
that pull request has merged.

Closes #841

* feat(observability): count and alarm on failed webhook screening (#794)

The Jira and Linear webhook processors screen recent comments and
Linear project documents on their own and drop them when the Bedrock
Guardrail call fails, so that third-party text never gates the
reporter's task (ADR-026). The only trace of such a drop was a warning
in the processor's log: a lasting guardrail fault could thin out the
context of every tracker task with no metric and nothing to alarm on.

The three paths the issue names now write one embedded-metric line for
each failed screening call: ABCA/Webhooks:WebhookScreeningFailed, with
a `source` dimension (jira-comments, linear-comments, linear-docs) and
a total without dimensions. Only a failed call counts. Content that
the guardrail blocks, or that no guardrail is configured to screen, is
dropped as before and not counted.

Where Linear or Jira is deployed, the deployment has one alarm on the
total (Sum >= 1 in a 5-minute period, missing data not breaching)
that notifies the shared OperationalAlerts topic. The
metric is sparse, so a rule that waits for several datapoints would
stay silent on a quiet deployment. Operators subscribed to the topic
get a new kind of notification, one per transition into ALARM.

The alarm comes from a private helper beside the stack's
addAlarmActions call, not from a new construct, and is created in the
ConcurrencyMaintenance nested stack, next to the scheduled jobs. The
root stack has no room for one more resource: its widest inline
configuration (all three backends, every option, a three-zone pin)
already needs the whole 490-resource budget.
OBSERVABILITY.md and ADR-026 describe the metric and the alarm.

Not counted: a sub-issue's own files in a Linear epic. They are
dropped one level up, where a failed screening call cannot be told
from the other reasons for a rejection.

Closes #794

* chore(setup): move lambda microvm regions into the capability catalog

The Regions that offer Lambda MicroVMs were declared in
cdk/src/handlers/shared/microvm-regions.ts, outside the capability
catalog, and a second, unguarded copy lived in the CLI. `bgagent setup`
checked neither, so `--compute lambda-microvm` in another Region got as
far as `cdk diff`, which then failed inside synthesis.

contracts/deployment-capabilities.json has a `compute` section with one
entry per backend; only lambda-microvm lists Regions. The CDK constant
is that entry, the CLI reads its parity-tested mirror, and the CLI's
own copy is gone. Setup rejects a backend the Region does not list as
soon as the compute selection is final, whether it comes from
--compute, the existing stack or the profile: before the feature
prompts, before a profile is written and before the diff.

For reviewers:

- Setup honours the escape hatch of ADR-021 as synthesis does: a
  non-empty microvm_region_override, from --context or from persistent
  CDK context, lifts the check. Without that, setup would refuse a
  stack that was deployed with the override.
- persistentContext() lists its sources lowest precedence first
  (~/.cdk.json, cdk.context.json, cdk.json), the order in which the
  CDK CLI lets one override another. Setup's network topology lookup
  reads the same list, so it also prefers cdk.json over
  cdk.context.json when both set networkTopology.
- `--no-deploy` refuses to write a profile with a backend the Region
  does not list.
- lastVerified and source are unchanged: they describe core and the
  features. The Lambda MicroVMs list is the ADR-021 launch list
  (2026-06-22), moved as it was and not checked against AWS again; the
  deployment guide says which entries the date covers.
- The synth warning, the synth error and the task-error remedy name
  the catalog as the place to add a Region.
- microvm-regions.ts imports the `compute` section by name, so the 32
  handler bundles that reach the error classifier carry that section
  and not the whole catalog.

Closes #1017

* fix(observability): show the turn count that max_turns limits

The turn numbers of one task disagreed, and `bgagent status` could
print one that `max_turns` does not limit against `~<max_turns>`.

The task record took both `turns_attempted` and `turns_completed` from
the `num_turns` that the agent SDK reports, and so did the `turn` of
`agent_cost_update`. That is not the count `max_turns` limits: on a
run stopped at the limit it is the limit plus one, and otherwise it
grows with each tool result, so an answer that calls two tools adds
two. A task with 62 answers under a limit of 80 and an SDK count of 90
was recorded with turns_attempted 90 and turns_completed 80.

Agent:
- `turns_completed` is the runner's count of the model's answers, which
  is what the limit counts, clamped to `max_turns`. The SDK's count
  stands in only where the runner counted no answer.
- `turns` and `turns_attempted` keep the SDK's raw count. The field
  documentation says what it is and why it can exceed the limit.
- `agent_cost_update` carries the turn number of the `agent_turn`,
  `agent_tool_call` and `agent_tool_result` events around it.

Turn line of `bgagent status`:
- `<n> / <max_turns>`, without the `~`: the limit is exact.
- A finished task shows the `turns_completed` of its record, whatever
  events are still in the window, as the web console does. A running
  task shows the turn of the newest `agent_turn` event, and so does a
  finished one whose record holds no count (0 included).
- `turns_attempted` is no longer printed against the limit.

Two values change their source, not their shape: `turns_completed` on
the task record and `metadata.turn` of `agent_cost_update` come from
the runner's count instead of the SDK's `num_turns`. No field is
added, renamed or retyped, and nothing reads the `turn` of a cost
update. `turns_completed` is lower than before for a task whose
answers call several tools at once.

Records written before this change keep the SDK's count as
`turns_completed`, and `bgagent status` prints it for them. An agent
built since #1052 clamped it to the limit: the task above reads
`80 / 80`, where it read `62 / ~80` while its last `agent_turn` event
was among the 20 events that `bgagent status` fetches, and `90 / ~80`
otherwise. An older agent did not clamp it: that task reads `90 / 80`,
where it read `90 / ~80`, or the turn of an `agent_turn` event that
such an agent numbered per message (`171 / ~80` in the issue). Deploy
the agent with or before the `bgagent` CLI.

Still open in #919: the Linear and Jira completion comments, the
Linear iteration reply and the Jira preview print `turns_attempted`
against `max_turns` (`turns: 90 / 80`).

Refs #919

* chore(cli): fail lint on an import that leaves the cli package

The CLI ships only lib/, compiled from cli/src, so a file outside the
package is not part of an installed CLI. Nothing but the compiler's
rootDir kept cli/src inside the package, and it stops TypeScript
sources only: an import of another package's build output (cdk/lib)
or of a JSON file such as contracts/constants.json compiles, and for
a source the answer is a bare TS6059. ESLint reported none of them
by path. For a workspace package imported by its name
(@abca/cdk/lib/...) its only answer was
import-x/no-extraneous-dependencies, which proposes to declare the
package: with the package declared, lint and compile passed.

import-x/no-restricted-paths fails an import in cli/src of any file
of the repository outside cli/, by a path or by the name of a
workspace package. The root node_modules is exempt, where Yarn
installs the dependencies, but not the links Yarn makes there for
the workspace packages. The message says what to do instead: mirror
an API type or constant in src/types.ts, which check:types-sync
compares with the CDK, or copy the value and pin the copy with a
parity test. cli/src holds no such import, so the rule lands without
findings. Tests are not covered: they may load a contract.

The first zone is the repository minus the package, not a list of
sibling packages: contracts/ is mirrored for the same reason as the
CDK types, and no listed directory can be renamed and switch the
rule off unnoticed. The second zone is those links, the CLI's own
aside: the build output or a JSON file of a workspace package,
imported by the package name, resolves to a path through its link,
which the first zone lets pass with the rest of node_modules. A test
row imports @abca/cdk/package.json, so a renamed scope fails the
test instead of switching that zone off.

cdk/AGENTS.md and cli/AGENTS.md also say what the two messages of
import-x/no-cycle mean and how to break a cycle.

Refs #254

* chore(cdk): drop nodejs20.x from the cedar layer's compatible runtimes

The engines range no longer admits Node 20 (#1035, #1052). The Cedar
layer's compatible runtimes still named it, and the issue left "drop
or keep" open for the Lambda runtime references.

Drop. Lambda deprecated nodejs20.x on 2026-04-30 and every function
of the stacks runs nodejs24.x, the one that attaches the layer
included. The list filters layer listings, and CDK refuses at synth
to attach a layer to a function whose runtime is not in it, so no
function changes behaviour.

For operators: CloudFormation replaces the layer version on the next
deploy, as on every cedar-wasm bump, and the CedarWasmLayerArn output
carries the new ARN. Nothing to do.

The one other nodejs20.x reference in the repository, the fixture
function of the solution-UA aspect test, moves to nodejs24.x with the
change for #192 (deprecation warnings of the build).

Closes #889

* fix(jira): do not drop an admitted event when the registry read fails

The Jira webhook processor decided whether to create a task from a
registry read that turns every DynamoDB error into "tenant not in
registry". On the trigger-label path and on the @bgagent comment
iteration path a throttled read, a timeout or a missing permission
therefore ended the invocation successfully with a WARN. The receiver
had already answered Jira, and Lambda retries an asynchronous
invocation only when it fails, so the event was lost.

Both paths now read the workspace registry row with the existing
getRegistryRowStrict before they resolve the token. A read that fails
is logged at ERROR and fails the invocation, and Lambda delivers the
event again, twice by default. Everything before that read is a read
and task creation carries an idempotency key, so a retry repeats no
side effect; no Jira comment is posted for a failed attempt. A
registry that was read and holds no usable row still drops the event,
under its own log line. A row that was read is served to the resolver
from its cache, so the path makes no second query.

The label path's WARN names the missing token instead of the registry
and keeps the phrase "dropping event". The Jira setup guide tells the
two log lines apart.

For operators: an unreadable registry shows …
isadeks added a commit that referenced this pull request Nov 25, 2026
…onto main

The Linear changes of #996, #998, #1001 and #1004 were written before main's
MicroVM approval lifecycle (#904), the nested maintenance stack, the shared
Linear user lookup and the stricter lint. This adapts them:

- approve/deny: recordApprovalForUser / recordDenialForUser keep main's
  post-commit step (audit and MicroVM wake) and add decision_source to its
  audit metadata; the API handler passes its invocation start and context
- the grant health probe runs before the webhook processor's existing handler,
  which keeps its complexity record; the reconciler that triggers it stays in
  the maintenance nested stack, and the trigger sits inside main's
  `if (linearIntegration)` guard
- the vault default resolves to on only with both Linear and AgentCore, and
  keeps main's guard for an explicit true without Linear
- the shared Linear user lookup reads consistently, since approval replies
  and a session stop are authorized from it
- the approval-reply check in handleCommentTrigger moves to a helper (the
  function was past the complexity ceiling); the control-character regexes
  that strip terminal escapes from untrusted text are marked as intended
- stack tests count the vault's three functions and its consent-page stack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-runtime Python agent container: pipeline, runner, hooks, prompts, tools, Dockerfile documentation Improvements or additions to documentation infra-cdk CDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardown security Cedar/HITL, IAM least-privilege, secrets, PII/DLP, guardrails, supply-chain/CVE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants