Repository navigation
Conversation
added 30 commits
November 26, 2026 08:24
…ing it `bgagent repo onboard` built a new item from the fields it knew and sent a PutCommand, so a re-onboard dropped every column the CLI does not model: build_command, lint_command, mcp_servers, cedar_policy_modules and skills. The row lacked them until the next deploy, and `repo show` could not show it. The write is now one UpdateItem: SET what is given, keep onboarded_at when the row exists, REMOVE ttl on activation and REMOVE what `unset` names. Attributes the CLI does not know are left alone. Behaviour changes: - the operator needs dynamodb:UpdateItem on RepoTable instead of PutItem; - the text line says `onboarded`, `updated` or `re-activated`; - the JSON output carries `change` and the row as stored; - `repo show` prints 100 as the platform default turn limit (it said 200). The emulator test of the expression is written but not committed: Docker was not available to run it.
The Blueprint custom resource replaced the whole RepoTable row with a PutItem on create, and its update set status without removing ttl. Values set with the CLI were lost on the first deploy of a Blueprint, and a repository offboarded with the CLI and re-activated by a deploy was deleted by DynamoDB 30 days later. Create and update now send the same UpdateItem: SET the declared columns, status and updated_at, onboarded_at only if absent, and REMOVE ttl. The asset lists keep today's rule (removed when the Blueprint declares none). The custom resource policy drops dynamodb:PutItem. Template effect: properties of the two Custom::AWS resources and their policy; no logical ID changes. The emulator test of the expression is written but not committed: Docker was not available to run it.
…et_usd The orchestrator passed the row's values through unchecked; the API bounds the per-task values (1 to 500 turns, 0.01 to 100 USD) but nothing bounded what a Blueprint or the CLI stored. A value of zero or less now counts as not set (the platform default applies), a turn limit is rounded down and held to 1-500, a budget is held to 0.01-100, and each adjustment is logged with the task context. A value that is not a number passes as before.
SYSTEM_PROMPT_OVERRIDES was sent in the ECS container environment, which nothing reads: the agent takes the text from the payload. The entry counted against the 8,192 bytes ECS allows for all overrides of one RunTask call, so a per-repo prompt of a few kilobytes failed every ECS task of the repository at dispatch.
PolicyEngine took five operator-policy inputs; production passes one, blueprint_policies (runner.py). Remove extra_policies, blueprint_hard_policies, blueprint_soft_policies and blueprint_disable, the second routing source, the disable validation and the disable filter on the evaluation path. The soft tier now answers a Cedar deny that names no rule the engine parsed with the same fail-closed deny the hard tier gives, pinned by a test.
contracts/cedar-parity/ compared the decisions of cedarpy (agent) and cedar-wasm (one CDK Lambda). The CDK side never decides a request, so the contract guarded nothing that ships. Delete the fixtures, both runners and the engine-pair version test; the agent's own rule tests keep pinning the shipped behaviour, and a test now names the exact cedarpy pin so a version bump stays a deliberate change. Links and guide sentences that named the contract are updated.
ADR-028 records the decision to keep a single Cedar engine, in the agent, and to remove the CDK-side engine with its one consumer, the policy listing. ADR-029 records why Strands Box is not adopted now, either as a replacement for the Cedar approval gates or as a layer under them, and the conditions under which to revisit it.
The package was imported once, to copy the workload access token of an invocation into a context variable that nothing reads: the Linear vault path mints its token through boto3. Remove the header reader, the parameter and the bridge from server.py, and the dependency. uv.lock loses bedrock-agentcore and websockets, which had no other dependent. IDENTITY_AND_AUTH.md and ADR-016 no longer describe the bridge. The agent image was not rebuilt for this change.
checkRepoOnboarded, topologicalOrder and planRestack had no caller outside their tests; the onboarding cases now exercise lookupRepo, the function the handlers call. Also remove the no-op //cdk:bundle task and scripts/ci-build.sh, which nothing runs, and name the two handlers/*/index.ts entry points in knip.json, so that knip counts them as deployed code and not as files kept alive by their tests.
WebhookCreateTaskFn is given the attachments bucket's name but had no write access to it, so storing an inline attachment was denied. It now gets the same put and delete grant as CreateTaskFn, through one helper both use. IAM: one existing role gains what grantPut and grantDelete emit for the objects of the attachments bucket: s3:PutObject, s3:PutObjectLegalHold, s3:PutObjectRetention, s3:PutObjectTagging, s3:PutObjectVersionTagging, s3:Abort* and s3:DeleteObject*. No other resource of the 142 synthesized profiles changes. The 8 KB body rule on /v1/webhooks/tasks is unchanged and still limits what fits in a request.
MEMORY.md and ARCHITECTURE.md named a MemoryStore interface; there is none. INTERACTIVE_AGENTS.md carried an "Active design" status with a feature branch and drew the operator console as a future web UI; INPUT_GATEWAY.md called the operator console and Slack future work and did not list Linear and Jira.
Eight public properties of the construct and its approval-gate-cap info annotation had no reader in cdk/src (the DNS allowlist reads the definitions array). The synthesized resources are unchanged.
cli/src/repo-settings.ts lists the 16 RepoTable columns an operator may set or remove. `repo onboard` registers its setting flags from it and accepts a repeatable `--unset <column>` for any of the 16; `repo show` prints from it, including build_command, lint_command and the three registry pin lists. A bad flag value or an unknown column is refused before any AWS call. That includes an empty --compute-type, which the substrate check used to refuse after the stack had been read.
The API error, the CLI error and the console's mock told the reader to register the repository with a Blueprint, which is a source edit and a deploy. They now name the CLI command as well.
Nine construct files declared the Linear, Jira and Slack mapping, registry and installation tables. They differed in the partition key, the TTL attribute and one index. cdk/src/constructs/integration-parts.ts now builds them, and the webhook dedup tables, under the same construct ids: every logical ID and the synthesized templates are unchanged. The row-schema comments moved to the call sites.
The Linear, Jira, GitHub and Slack verifiers each carried their own five-minute secret cache, timing-safe HMAC compare and verify-then-refetch-once. shared/webhook-hmac.ts holds the three. Each surface keeps its header, signed string, replay window and tenant ladder. Exported names and log texts are unchanged, and so are the four verifier suites; a suite for the core adds the two cases they lacked: a signature that matches neither the cached nor the fresh secret, and the lifetime of a cache entry. The Linear and Jira receivers hold a second Secrets Manager client, the core's, beside the verifier's own. One order changed, on paths no caller can reach: the unusable-secret check now runs inside the comparison, so after Slack's timestamp checks and after the prefix handling of Jira and GitHub. Every path to an accepted signature still goes through it.
The Linear, Jira and GitHub receivers ended in the same three steps: a conditional put of the dedup row, an async invoke of the processor, and removal of the row when the invoke fails. shared/webhook-dispatch.ts does it for the three. Responses and log texts are unchanged; the dedup-hit lines and Linear's invoke-failure line carry more fields. The Jira receiver keeps its own DynamoDB client for the tenant lookup beside the tail's. The complexity record of the GitHub handler goes from 49 to 43.
The three handlers were the same code with other attribute names. shared/account-link.ts holds it and each handler file is a spec. Responses, DynamoDB commands and log lines are unchanged, except that Linear and Slack now read the pending code with ConsistentRead, as Jira did.
The create-task failure message, the comment section renderer, the append of an advisory section within the description budget and the advisory screen-or-drop existed in both webhook processors. shared/tracker-intake.ts holds them, with a suite of its own. The processor suites pass as they were; three of their cases now also look at the text the call site hands to the guardrail. ADR-026 names the new function.
Both attachment modules checked the magic bytes of a downloaded file, screened it, stored it and recorded it with the same code, and deleted stored objects the same way. shared/attachment-store.ts holds both steps. Downloading, the size and empty-file checks and Linear's MIME inference stay per surface. No test changed.
Per-task notification overrides were typed and resolved, but the value passed to the resolver was always undefined; the email channel was a log line counted as a dispatch. Both are plumbing of features that were designed and not built (docs/design/INTERACTIVE_AGENTS.md). What an operator can see: `dispatched` no longer lists email, so approval_requested goes to Slack only; the INFO line fanout.email.dispatch_stub and the WARN line fanout.resolve.empty_events_override are gone; and fanout.batch.complete no longer counts an event that only the stub delivered. TaskNotificationsConfig and ChannelConfig leave the shared types.
No caller passes a Slack registry and nothing writes channel_source
'slack' on an orchestration, so the adapter could not be reached. It was
written as the proof that the Channel interface holds for a second
surface; Jira is that second surface now. The open registration hook
stays. channelForSource('slack', ...) still returns undefined, now
without the warning "No credentials registry configured for this
channel".
The acknowledger answers `help` itself and now stamps source 'slash' on what it forwards, so the processor's help case and its normalisation of a payload without a source are gone.
The events handler had its own branch for an unpopulated signing secret.
The secret always has a value in a deployed stack; when it reads as
absent, the route now answers 500 {"error":"Internal configuration
error"} and logs the ERROR line "Slack signing secret not found", as
the interactions route does. That holds for every body: one that is not
JSON got the handler's general 500 {"error":"Internal server error"}
before. The command route logs the same line and answers with an
ephemeral message.
Six actions read their stack outputs one DescribeStacks call at a time and repeated the "missing outputs" block. One helper reads them in one call and reports what is missing, with the old hint. The complexity record of `linear setup` goes from 97 to 93.
The listing of a repository's Cedar rules was the only consumer of the
Cedar engine on the Lambda side (ADR-028). The route, its function and
the command that called it are removed, so that the engine can follow.
- cdk: delete the handler get-policies and its test. TaskApi no longer
creates GetPoliciesFn or the API resources repos, {repo_id} and
policies, and loses the prop cedarWasmLayer. The types
PolicyRuleSummary and GetPoliciesResponse are removed. The
CedarWasmLayer construct and its stack output stay for now.
- cli: delete the command policies (list, show) with its test,
ApiClient.listPolicies and the two types of the mirror.
- docs: the user guide lists the eleven built-in rules (id, tier, what
each one stops) under "Rule ids", in place of "Discovering repo
policies". The API contract keeps the heading with a migration note.
The quick start, the Cedar policy guide and INTERACTIVE_AGENTS.md no
longer name the command.
- agent: a test compares the guide's table with the rules shipped in
agent/policies/, ids and tiers, in both directions.
Behaviour changes:
- GET /v1/repos/{repo_id}/policies no longer exists. API Gateway
answers a request for it as for any unknown route.
- bgagent policies list and bgagent policies show no longer exist. The
CLI answers "error: unknown command 'policies'".
- A stack update deletes 11 resources of the root stack (the function
with its role and policy, three API resources with their four
methods, one Lambda permission) and replaces the API deployment.
None of them holds data.
The complexity record of the TaskApi constructor goes from 54 to 51,
and the count of solution Lambdas in the stack test from 54 to 53.
BREAKING CHANGE: GET /v1/repos/{repo_id}/policies and the command
bgagent policies are removed inside /v1, without an alias. The ids of
the built-in rules are in the user guide; the ids of a repository's own
rules are on the approval requests they raise (bgagent pending).
Nothing in cdk/src used the Lambda-side Cedar engine once the policies listing was gone. The agent's cedarpy engine and agent/policies/*.cedar are the only engine and the only copy of the built-in rules (ADR-028). Removed: - the parser (handlers/shared/cedar-policy.ts), the TypeScript copy of the built-in rules (handlers/shared/builtin-policies.ts), the CedarWasmLayer construct with cdk/layers/cedar-wasm/, and their tests - the dependency @cedar-policy/cedar-wasm (cdk/package.json, yarn.lock) Behaviour changes: - Every root stack loses the Lambda layer CedarWasmLayerB3B068E4 and the stack output CedarWasmLayerArn. On a deployed stack the update deletes the layer version; no other resource is removed. - A deploy no longer runs an npm install at synth time to build the layer. - The agent image changes: agent/pyproject.toml and the two rule files are part of its content, and their comments changed. No rule changed. Tests: the RULE_ID_ALLOWLIST test reads the rule ids from the text of agent/policies/soft_deny.cedar instead of the copy. It skips comment lines and accepts whitespace between the tokens of an annotation, as Cedar does. The bundle-boundary test no longer treats cedar-wasm as external; the two layer tests of the stack are gone. Contributor rules: AGENTS.md and agent/pyproject.toml state one engine, cedarpy, pinned exactly, with the version named by agent/tests/test_cedarpy_annotations_contract.py; CONTRIBUTING.md says it moves only by hand. agent/AGENTS.md says what a new built-in rule needs and which suites judge a cedarpy bump. mise.toml, cdk/AGENTS.md and .abca/commands/review_pr.md lose their text about the engine pair. The developer guide's stack-output table loses the CedarWasmLayerArn row. The rule files' comments no longer name a disable list that does not exist. The module docstring of agent/tests/test_policy_builtin_rules.py no longer describes the copy and the parity fixtures.
docs/design/CEDAR_HITL_GATES.md described the rule listing, the Lambda-side Cedar engine, its layer and the cross-engine parity contract as built, and two checks of rule: scopes that were never built. Every heading line is unchanged, so anchors and section numbers hold. - Implementation line, status note of section 15: the listing, the Lambda-side engine, the layer and the parity contract were removed; the rows that name them stay as the record of that work. - Decisions: 19 and 23 are marked withdrawn, 5 no longer names `bgagent policies list`. - 5.1: a note that the `disable:` list and `maxPreApprovalScope` are design, not built, as the Cedar policy guide already says. - 5.2: the @rule_id row names approval requests and the two rule: options instead of the listing command. - 5.4, 13.10: the agent's engine is the only Cedar parser; task creation checks the syntax of a scope; a rule: scope that names no loaded rule matches nothing. 5.4 says that sections 4 and 7.3 still describe the design. - 7.6, 8.1: the endpoint and the two commands are gone; 7.6 says where rule ids are found. The response example of 7.7 shows `matching_rule_ids`. - 13.4, 13.11, 15.6: one engine; 15.6 names the exact cedarpy pin, the test that names the version and the three agent suites that judge a bump. - 13.16: the policy_fail_closed row says "Cedar engine error". - 16, IMPL-29: what cedarpy reports in `diagnostics.reasons` and the test that fails when it goes; the cedar-wasm half of the note is removed. Also: - docs/guides/CEDAR_POLICY_GUIDE.md: the rules are loaded and probed when the agent starts, not before the task is admitted. - docs/design/WORKFLOWS.md: agent_config.cedar_policy_modules is validated (rules 5 and 8) and not applied; the paragraph on registry-sourced modules no longer cites a re-validation of initial_approvals at HYDRATING, which was not built. - ADR-028 links to the user guide's "Rule ids" section. Documentation only, no behaviour change. The mirrors under docs/src/content/docs are regenerated with `mise //docs:sync`.
policy.py no longer checks contracts/constants.json when it is imported. The build checks the same six invariants on the same file (scripts/check-constants-sync.ts, part of drift-prevention), so _validate_constants and its test class are removed. cedarpy is imported at the top of policy.py instead of inside PolicyEngine.__init__. The disabled engine that a failed import left behind is removed: the _disabled and _cedarpy attributes, the guards in _eval_tier and evaluate_tool_use, and the cedarpy_module parameter of _parse_policy_set, _parse_policy_annotations and _route_operator_policies. Behaviour changes: - A constants file in which approval_gate_cap or approval_timeout_s breaks 0 < min <= default <= max no longer fails the import of policy.py with a ValueError. The build fails on such a file. - When cedarpy cannot be imported, policy.py, hooks.py, runner.py and entrypoint.py fail to import, and the task fails before the agent starts. Before, the task ran and every tool call was denied with "policy engine unavailable". That reason and the log line "cedarpy not available — policy engine disabled (fail-closed)" are gone. cedarpy is an exact pin among the agent's runtime dependencies. With cedarpy installed no decision changes. Tests: the two tests of the disabled engine are removed. The two hook tests that used it force the fail-closed deny with policy text that Cedar cannot parse, and the parse-error test also asserts fail_closed. The comment above the six invariants in scripts/check-constants-sync.ts no longer says that the agent repeats them at import.
renderIterationSuccessReply with its input type IterationReplyInput (handlers/shared/iteration-reply.ts) and renderJiraFinalStatusText (handlers/shared/jira-status-comment.ts) had no caller outside the test suites. Handlers render the iteration reply with renderMaturingReply and the Jira terminal comment with renderJiraFinalStatusComment. The two functions are deleted with their nine test cases and one assertion. The header comment of iteration-reply.ts described the deleted renderer and goes with it. One of the deleted cases was the only check that a long answer is cut at 2000 characters, which renderMaturingReply does too. A case now checks it on that renderer. No behaviour change.
added 30 commits
November 26, 2026 20:17
The Blueprint's UpdateItem removed mcp_servers, cedar_policy_modules and
skills from the RepoTable row whenever its definition did not declare
them. The call runs on every deploy, and the default Blueprint declares
no assets, so every deploy removed a list that had been written into
the row in any other way than through the definition. `bgagent repo
onboard` writes the same row (ADR-017); it has no flag for these three
columns yet, and such flags need this rule.
The call now removes ttl and each asset list the definition declares as
an empty array. It no longer names a list the definition leaves out.
Behaviour changes:
- A list the definition does not declare keeps the value the row holds.
Deleting the `assets` key, or one of its lists, from a definition no
longer detaches the pins.
- To detach a list, declare it as empty (`assets: { mcpServers: [] }`)
and deploy, or run `bgagent repo onboard <repo> --unset mcp_servers`.
- A list that an earlier deploy removed stays removed.
- The same holds for a row that an offboard left: a Blueprint that
registers the repository again keeps the lists it does not declare.
- Template: Create and Update of a Blueprint that declares no asset list
end in `REMOVE #ttl` and no longer name the three asset columns. A
Blueprint that pins all three lists is unchanged.
The constructor reads props.assets once, which keeps it below the
complexity ceiling of the lint. The comment of the `assets` prop states
the rule.
Tests cover the call of a Blueprint with no override, of one with a
pinned and an empty list, and of each list declared as []; every row of
the placeholder table removes ttl alone.
agent/src/registry/ held a Python copy of the registry client, the registry:// grammar and the semver resolver: four modules (632 lines) and five test files (811 lines, 129 tests). No agent code imported them. The orchestrator resolves the refs in TypeScript and sends the resolved assets in the task payload, and the agent runtime has neither the registry id nor a registry permission. The modules and their tests are deleted; registry/loader.py, which applies the resolved assets, stays. contracts/registry-resolution/ is now the golden corpus of the TypeScript parser and resolver alone, run by the two cdk suites. Its README and the two corpus descriptions say so, as do docs/design/REGISTRY.md and a comment in the workflow validator. The README of contracts/deployment-profile-vectors/ no longer cites it as a contract between two packages. ADR-022 records the removal in a dated Changelog entry. No behaviour change: nothing that a task or a Lambda runs is touched.
For every Jira task the agent wrote a `jira-server` entry for Atlassian's hosted MCP into the clone's `.mcp.json`. The module itself called the entry a non-functional placeholder: the endpoint wants an interactive OAuth 2.1 flow that a headless agent cannot complete, and no prompt, policy or tool list named the server. Outbound Jira writes go through `jira_reactions.py`, which is unchanged. `agent/src/channel_mcp.py` loses `configure_channel_mcp`, the one-entry registry `CHANNEL_MCP_BUILDERS`, `_jira_server_entry` and the constants `JIRA_MCP_URL`, `JIRA_MCP_SERVER_KEY` and `JIRA_API_TOKEN_ENV`. It keeps the Linear MCP scrub (`strip_linear_mcp_servers`) and `read_existing_mcp_config`, which the registry loader uses. `pipeline.py` no longer calls the function. Docstrings and comments that described it are reworded. Behaviour changes, all for tasks with channel_source "jira": - `.mcp.json` in the clone is no longer created or given a `jira-server` entry. A repository's own file is left as it is; the Linear scrub still applies. - A tracked `.mcp.json` no longer gets the skip-worktree flag from this path, so the agent's own edits of the file can be committed, as on every other channel. - The session no longer starts with an MCP connection attempt that was expected to fail. - These log lines are gone: TASK "jira MCP configured at ...", TASK "jira MCP entry is a placeholder and is EXPECTED to fail to connect ...", WARN "configure_channel_mcp: repo_dir missing or not a directory ...", ERROR "Failed to write jira MCP config to ...". `JIRA_API_TOKEN` is still resolved: `jira_reactions.py` reads it for the OAuth fallback. Tests: the 18 cases of the deleted function go. Three cases that used it to prepare a file now write the file themselves and guard what they guarded: the scrub leaves a Jira server and other servers alone, and an untracked `.mcp.json` gets no index entry. ADR-015 gets a dated note.
cdk/test/handlers/shared/attachment-store.test.ts calls screenAndStore and deleteStoredObjects of attachment-store.ts directly, with literal expectations. Until now only the suites of the Linear and the Jira download reached the two functions, through their callers. screenAndStore, 11 cases: the type check comes before the screening call; an image is screened as an image and a file as text, under the display name and with the guardrail configuration; the bytes the screening call hands back are what is stored and measured; the key, the PutObject input and the whole record of a stored image, and the type, the content type, the name and the key in the record of a file, where the display name is used only as a name; a verdict, a failed screening call and a failed put are refused through the caller's fail() with their cause, a blocked result with its categories and without a put; the SDK text goes to the log only; the key is on the caller's list as soon as the object is stored. deleteStoredObjects, 4 cases: no key, all deleted, a partial failure and a rejected call (what is logged, and that nothing is thrown). Tests, and one comment: the header of attachment-store.ts names the new suite. One assertion in linear-attachments.test.ts states the key under which a labelled file is stored. No behaviour changes.
scripts/check-masking-suppression-placement.mjs is a step of `mise run security:sast:masking`, which the push hook and the security workflows run. It lists the tracked files with `git ls-files` and looks at each one on disk. git still lists a tracked file that was deleted in the working tree and not yet staged, so the script ended with an uncaught ENOENT and a stack trace, and the task could not run until the deletion was staged. Behaviour change: such a file is now passed over, like a tracked link or a submodule. It holds no suppression and semgrep does not read it. The summary counts the files that were read. Every file that is in the working tree is read as before, and the exits for a check that could not run are unchanged. The suite gains one case: a tracked file deleted after `git add` gives exit 0 and the usual summary.
verifyWithRefetch reads the signing secret again after a signature mismatch, and dropped the cached entry before that read. It now drops nothing before the read. What the read finds decides, as before: another secret replaces the entry, an absent secret or an unusable value removes it. Behaviour change, for the Linear, Jira, GitHub and Slack receivers: after a re-read that fails, the entry lives until its five minutes are over, as it would have without the mismatching request. A delivery that matches it verifies from the cache in that time, without a read. webhook-hmac.test.ts gains cases for the failed re-read, for a re-read that finds the same secret, for one that finds another secret, for one that finds the secret absent or empty, and for the lifetime of an entry after a read that fails. Three of the exported invalidators carried a comment saying they are called when a rotation is suspected. No source calls them any more, so the comments are removed.
The Jira webhook processor held grantReadWrite on the attachments bucket. It sends two S3 requests: PutObject for the screened bytes of an attachment and DeleteObjects when the task is not created. The construct now grants put and delete, as LinearIntegration does for its processor. Behaviour change, IAM only (role of JiraIntegration/WebhookProcessorFn): - the role no longer holds s3:GetObject*, s3:GetBucket* and s3:List* on the attachments bucket and its objects; - it keeps s3:PutObject, s3:PutObjectLegalHold, s3:PutObjectRetention, s3:PutObjectTagging, s3:PutObjectVersionTagging, s3:Abort* and s3:DeleteObject*, now named on the objects only (the bucket ARN is no longer a resource; these are object actions); - in the template one statement of the role's inline policy becomes two (23 to 24 statements). No resource is added, removed or replaced. The construct suite passes a bucket and checks that the processor's role holds put and delete on it and no other S3 action.
A Lambda that writes feedback to a Linear or Jira issue needs read
access to the tracker's workspace registry, the registry's name in its
environment and access to the tracker's OAuth secrets. These three steps
were written out by hand seven times in stacks/agent.ts (one of them in
two places) and twice each in FanOutConsumer and
GitHubScreenshotIntegration.
LinearIntegration and JiraIntegration now implement FeedbackTracker
(constructs/integration-parts.ts): grantFeedback(fn, { writeBack })
does the three steps and issueIndexName names the tracker's task-table
index. writeBack is required: each caller says whether its function
may store a rotated token; without the write a role only reads one.
FanOutConsumer and GitHubScreenshotIntegration take `trackers` in place
of their per-tracker props. The stack calls grantFeedback for the
orchestrator, the orchestration reconciler, the stranded-orchestration
sweep and the iteration heartbeat. secretArnPattern replaces the inline
ARN patterns of the two OAuth secret prefixes.
Every role keeps the permissions it had; the reconciler, the sweep and
the heartbeat still read Linear secrets without the write-back.
What changes in a synthesized template:
- with Linear deployed, the statements of the inline policies of the
orchestration reconciler and of the stranded-orchestration sweep come
in another order; no statement is added, removed or moved to another
policy;
- the environment variables of two functions keep their names and
values and come in another order: the screenshot processor's when a
tracker is deployed with it, the fan-out consumer's when Linear agent
sessions are enabled and Jira is deployed.
Tests: the fan-out and screenshot suites pass a stand-in tracker that
honours the option it is called with, so they fail when either
construct stops asking for the write on the Jira secrets; new cases for
secretArnPattern, grantTrackerFeedback and both trackers' grantFeedback;
the stack suite also checks that the orchestrator and the screenshot
processor are wired to both trackers, that the screenshot processor
may query both trackers' task-table indexes, and it lists the functions
that may store a rotated OAuth token of each tracker, so that a
function that gains or loses that write shows there.
bgagent repo onboard gains six flags for per-repo settings that so far needed a Blueprint and a deploy: --max-budget <usd> max_budget_usd, 0.01 to 100 --memory-token-budget <tokens> memory_token_budget, an integer from 1 --approval-gate-cap <n> approval_gate_cap, 1 to 500 --build-command <command> build_command --lint-command <command> lint_command --system-prompt-file <path> system_prompt_overrides, from a file Numbers are written in digits only; the budget may have a decimal part. The prompt file must be UTF-8. Its text is stored without surrounding whitespace and may hold 64 KB. A value out of range, a file that cannot be read, is not UTF-8 or holds a NUL character, and a text above the limit are refused before any AWS call. The CLI mirrors APPROVAL_GATE_CAP_MIN and APPROVAL_GATE_CAP_MAX (cli/src/types.ts). check:types-sync now compares the pair with the CDK instead of listing it as CDK-only, and the constants parity test holds it to the contract. Behaviour change: an empty or blank --runtime-arn, --model or --token-secret-arn is refused with "<flag> must not be empty (use --unset <column> to remove the setting)." It was ignored. With that, every setting flag refuses an empty value, the new ones included.
bgagent repo onboard gains four repeatable flags, for four per-repo settings that until now needed a Blueprint and a deploy: --cedar-policy-file <path> cedar_policies, one file per entry --mcp-server <ref> mcp_servers --cedar-policy-module <ref> cedar_policy_modules --skill <ref> skills The values given replace the stored list. A list flag that is not given leaves its column alone, and --unset removes it. After the write the command prints one note per replaced list, in front of its other notes: <column>: stored entries replaced (<n> before, <m> now). The help of each of the four flags says that the values given replace what is stored. The flags have no default, so the help prints none behind that sentence. A rule file must be UTF-8 without a NUL character; its text is stored without surrounding whitespace. The rule files of one command may hold 64 KB together, the size above which the agent refuses operator rules (POLICIES_MAX_BYTES in agent/src/policy.py; a test reads that line). The help of --cedar-policy-file states the encoding and the limit, and asks for one tier per file. The command parses no Cedar: the agent does when a task starts. A ref is trimmed and must start with registry://<kind>/ for the kind of its flag (mcp_server, cedar_policy_module, skill), so that a pin cannot land in the column of another kind. The orchestrator checks the rest of the ref when a task starts. A pin is refused when the stack's DeploymentFeatures output exists and does not list agentRegistry: without the registry every task of the repository would fail. A stack without the output is not checked. The output is read with the other outputs, in one call. An empty or blank value of a list flag is refused, as for every other setting flag. With these, each of the 16 columns that --unset accepts has a flag. The note about what still needs a deploy no longer sends the reader to a Blueprint for Cedar policies. It reads: "Egress domains, and IAM for a custom runtime or token secret, still need a CDK deploy." --system-prompt-file and --cedar-policy-file share one file reader; the prompt flag behaves as before.
Add `testf` to cli/mise.toml, web/mise.toml and agent/mise.toml. With the task cdk already had, one spelling runs one test file in cdk, cli, web and agent: `mise //<package>:testf -- <path>`, the path relative to the package directory. - //cli:testf runs `yarn jest --ci --coverage=false`. Without coverage a partial run does not fail on the floors. With --ci, as in the suite, a missing or changed snapshot fails the run instead of being written; `-u` writes it. - //web:testf runs `yarn vitest run --config vite.config.ts`: no coverage and so no floors. - //agent:testf runs `uv run --locked pytest --no-cov`: a stale uv.lock fails the run instead of being rewritten. cli/AGENTS.md, web/AGENTS.md and agent/AGENTS.md name the task where they prescribed raw jest, vitest and pytest commands, the snapshot update in the cli guide included. The root AGENTS.md no longer limits "prefer mise tasks" to full suites and names the four packages that have the task. The description of //agent:test names the task instead of `uv run pytest --no-cov`, and web/mise.toml loses the comment that named `yarn vitest run`. No existing behaviour changes: the commands of the `test` tasks, which contracts/coverage-thresholds.json pins, are as they were, and no build, hook or workflow runs the new tasks.
task_state.write_submitted had no caller. task_state.write_session_info and _ProgressWriter.write_approval_stranded were called only by their tests. All three go, with those tests. The approval_stranded milestone is unchanged: the stranded-task reconciler writes it. entrypoint.py re-exported 35 names from nine modules and reloaded config on import, for one test file. It is now the two names production uses: main (batch mode runs the file) and run_task_from_payload (the ECS boot command imports it). tests/test_entrypoint.py imports each function from the module that defines it, and a new test pins the two names. Behaviour changes: - Importing entrypoint no longer reloads config, and the module exposes only main and run_task_from_payload. No module in src/ or scripts/ imports it (ruff TID251). config's module body has no effect besides reading AGENT_WORKSPACE, so its second run changed nothing. - Batch mode and the ECS boot command no longer import runner when the process starts, nor the eight modules behind it (hooks, policy with cedarpy, microvm_lifecycle, stuck_guard, nudge_reader, output_scanner, clarification_tool, gateway_tools). The pipeline imports them when a task reaches them, as it does under server.py. Importing them only defines names (no environment read, no data file, no thread or process), so a task runs as before. An import error in one of them is now raised inside run_task instead of before it; the process exits 1 either way. - Tests: test_reads_env_var reloads config itself and restores the module afterwards. Before, config.AGENT_WORKSPACE stayed "/mnt/workspace" for the tests that ran after it. test_defaults_to_workspace goes; test_config.py has the same check. pyproject.toml loses the E402 exemption for src/entrypoint.py, and the message of the import ban on entrypoint says what the file now is. agent/README.md and agent/AGENTS.md describe entrypoint.py as it is now.
run_workflow has three callers, all in pipeline.py, all with only_kinds and none with a checkpoint. A task with a repository sends the runner its run_agent step only; a task without one runs hydrate_context, run_agent and deliver_artifact. The handlers for clone_repo, verify_build, verify_lint, ensure_pr and post_review, the WorkflowCheckpoint class with the resume branch of the loop, and the branch of the hydrate_context handler that built the system prompt were reached by tests only. They are removed with their tests, and with what only they used: StepOutcome.succeeded, to_checkpoint and from_checkpoint, and the step status "skipped". Behaviour: - A step of one of the five removed kinds that reached the runner would now fail with "no handler registered for step kind ...". No shipped workflow gets there: the repository lane restricts the runner to run_agent, and validator rule 3 forbids those kinds in a workflow without a repository. - run_workflow has no checkpoint parameter, the workflow package no longer exports WorkflowCheckpoint, and WORKFLOW_STATE_DIR is no longer read. No caller passed a checkpoint, so no state file was ever written and no run was ever resumed. - The runner has no milestone step:<name>:skipped any more, and StepStatus is "succeeded" or "failed". Only the resume branch sent that milestone, and no handler returned that status. - The outcome of the hydrate_context step no longer carries system_prompt_built. - validate_workflow reports an unknown step kind as "schema" only, not also as "rule-8": the schema enum already rejects the kind, and the handler half of rule 8 is gone. A new test holds three sets together: the step kinds of the schema minus the validator's repo-only kinds are the kinds the runner has a handler for. docs/design/WORKFLOWS.md gets a status note on the runner section; its gate paragraph no longer names step handlers for the verify steps, and its rule 8 no longer asks for a handler per step kind. ADR-014 gets an addendum that records the runner as built.
scripts/check-masking-suppression-placement.mjs, which the
`security:sast:masking` tasks run:
- A tracked file name outside .semgrep/ that is not valid UTF-8 now
ends the check with exit 2 ("could not run") and a message that
prints the name as decoded. The script knows such a name by U+FFFD,
which bytes that are not UTF-8 decode to, so a name that holds that
character itself is refused as well.
- A tracked path under a directory that was replaced by a file (lstat
answers ENOTDIR) is now passed over, like a tracked file that is
deleted and not staged (ENOENT): git still lists it and there is
nothing to read. It ended the script with an uncaught error before.
Every other lstat error still stops the script.
The suite gains a fake git, for a list that holds a name the disk
refuses, and three cases: the name that is not UTF-8, the replaced
directory, and a path that lstat refuses, which must not be passed
over. The case of the deleted file now lists that file before one that
holds a suppression and expects the suppression to be counted.
TaskApiProps.repoTable, guardrailId and guardrailVersion are required.
The stack, the construct's only caller outside its tests, already
passed all three, so no synthesized template changes.
The ten conditions on those props are removed; the statements they
guarded stay in place and in order. The constructor's cyclomatic
complexity falls from 51 to 38, under the ceiling of 40, so its
eslint-disable-next-line complexity directive is deleted.
Tests: every TaskApi of the construct suite takes a repo table and a
guardrail from one helper. The stack built only for the repo table
test and the second synthesis of the base stack with a guardrail are
gone: both tests assert on the base template. Four titles drop the
condition they named ("when repoTable is provided", "when provided"
twice, "when guardrail configured").
Six new tests synthesize one stack with webhooks, presigned uploads
and nudges and look at each function by its logical id. CreateTaskFn,
WebhookCreateTaskFn, ConfirmUploadsFn and NudgeTaskFn each carry the
guardrail id and version and exactly one bedrock:ApplyGuardrail
statement, on that guardrail. CreateTaskFn and WebhookCreateTaskFn
each carry the repo table name and a read grant on the table.
Behaviour: none at deploy time. Code that builds a TaskApi without
one of the three props no longer compiles.
Two suites of the emulator tier (mise run test:integration) for the merging writes of RepoTable. The unit suites see the update expression that is sent; only DynamoDB says what it leaves in the row. - cdk/test/emulator/blueprint-row.emulator.ts sends the UpdateItem call of a Blueprint's custom resource, read from the synthesized template. A repository without a row gets an active one. A row that an offboard left becomes active again, loses ttl and keeps its settings and onboarded_at. The settings a Blueprint declares are written. A stored asset list survives a Blueprint that does not declare it, and one that declares it as [] removes it. - cli/test/emulator/repo-onboard.emulator.ts runs bgagent repo onboard. A removed row comes back active with every attribute the command does not name, among them one the CLI has no type for. A repository without a row gets an active one. The tier passes on a fresh emulator: 33 cdk tests, 9 cli tests and 44 agent tests.
The stranded-orchestration sweep refreshes an epic's panel and settles its parent with the live reconciler's code, which picks the tracker from the orchestration's stored row. The stack gave the sweep's function the Linear workspace registry only and left it out of the Linear writers that are wired to the identity vault. With Jira deployed, the sweep's function gets JIRA_WORKSPACE_REGISTRY_TABLE_NAME and its role read access to the Jira workspace registry and secretsmanager:GetSecretValue and PutSecretValue on bgagent-jira-oauth-*, as the live reconciler has. A Jira epic that the sweep recovers now gets its panel update and its parent settled; before, the sweep logged "No credentials registry configured for this channel" and skipped both. Two more effects follow for Jira, both as the sweep already has them for Linear. At each run (every ten minutes) the sweep also updates the panel comment of every Jira epic that was settled within the last hour: about six more updates per finished epic; the parent's status is not changed again. And a Jira epic whose sub-issues have all ended but that was never settled is settled at the first run after the deploy, however old it is. With the Linear identity vault, the sweep's function gets LINEAR_VAULT_ENABLED and LINEAR_WORKLOAD_IDENTITY_NAME and its role the token grants of grantMintToken, so it mints the token of a vault-managed workspace like the other Linear writers; before, it read the stored secret only. No resource is added or removed. The sweep's inline policy gains three statements with Jira and three more with the vault, and the reason of the sweep's AwsSolutions-IAM5 suppression names the grants the stack adds (cdk-nag metadata of its function, role and policy). Tests: the vault test compares the functions that carry LINEAR_VAULT_ENABLED with the exact list of the seven wired ones, so a function that gains or loses the wiring fails it; the substring check it replaces found the live reconciler's name in the sweep's. The source-graph test follows a handler that imports another handler and so lists the sweep; the functions that may store a rotated Jira token include the sweep; the sweep's registry test expects both registries.
The Linear and the Jira webhook processor and the Slack command processor each assembled by hand what task creation needs: the environment variables (task and event tables, retention, repo table, orchestrator ARN, guardrail id and version, budget table and user pool) and the grants that go with them. The Linear and the Jira copy also carried the attachments bucket; the Slack copy never had it. cdk/src/constructs/task-creation.ts now holds one copy: taskCreationEnvironment(inputs) and grantTaskCreation(fn, inputs), with the conditions and the grant order the Linear processor had. The three constructs call both with their props, and their three DEFAULT_TASK_RETENTION_DAYS constants are gone. SlackIntegrationProps declares no attachments bucket, so the Slack construct hands its props on without one. No function gains or loses a permission or a variable. The Linear and the Slack integration synthesize to the same templates as before. For the Jira webhook processor only an order changes: in the policy of its role the statements for the orchestration table and the concurrency table now come last, and in its environment BUDGET_TABLE_NAME and USER_POOL_ID now come before the orchestration variables. A deploy rewrites that one policy in place. cdk/test/constructs/task-creation.test.ts covers both functions (all inputs, the required inputs alone, a guardrail id or version alone), checks for each construct that its processor has the environment and the statements the helper gives, and checks that the Slack command processor gets no bucket from a props object that carries one.
build_config loaded the task's workflow with a fallback. When the file did not load it logged an error and continued on values derived from the workflow id: read-only unless the id was in _KNOWN_WRITEABLE_WORKFLOW_IDS, repository required unless the id was default/agent-v1, no tool list. Such a task could not succeed: the agent step loads the same file without a fallback. A task with a repository cloned it, failed in the agent step and then ran the post-hooks for an agent that never ran. build_config now lets the loader's WorkflowValidationError, a ValueError, propagate; test_unloadable_workflow_raises pins that. The two later loads lose their fallbacks too: the post-hook load in run_task and _task_pushes in repo.py. The loader is memoized, so once build_config has loaded a workflow these calls return the same object and cannot fail; test_same_id_returns_the_same_object pins that. Deleted with the fallbacks: _KNOWN_WRITEABLE_WORKFLOW_IDS, the cdk test that kept it in step with the workflow files, the three tests of the fallbacks, and a span helper that only one of them used. Comments, docstrings and the README line that described the fallbacks are cut to what remains. _apply_post_hook_gates and _step_milestone still accept None for the workflow; run_task no longer passes it. Behaviour changes: - A task whose workflow file cannot load fails while its configuration is built, like any other configuration error: before the RUNNING status, the acknowledgement on the tracker (the eyes reaction on Linear, the start comment and the card move on Jira), the clone and the agent. run_task raises before its own failure handler, so that handler writes no FAILED row, emits no METRICS_REPORT and sets no mark on a Linear issue. The caller reports instead. On AgentCore and MicroVM the server's backup write records "Background pipeline thread: WorkflowValidationError: <loader message>", and /ping answers 503 (background_pipeline_failed) as after any exception out of run_task. On ECS the container exits with code 1, the task gets "Exit code 1: ..." from the orchestrator's poll and the loader's message is in the container log. In local batch mode get_config prints the message and exits with 1. - The log lines "workflow ... failed to load (...); using fallback policy" and "post-hook workflow reload failed (...)" are no longer written. No task that completes today is affected: the orchestrator pins only ids that have a workflow file. The server's pre-check of the required parameters keeps its own fallback, which assumes that a repository is required.
"Create the stream, tolerate that it exists, put one event" was written
four times. shell.put_log_event(log_group, stream, message) now does it,
through aws_session.platform_client as before, and raises on failure.
The fatal-error mirror (shell._log_error_cw_blocking), the server's warn
and debug writers and the metrics writer
(telemetry._emit_metrics_to_cloudwatch) call it. Each keeps its stream
name (agent_error/, server_warn/, server_debug/, metrics/), its message
and its own handling of a failed write.
Behaviour changes, both in the metrics writer:
- An ImportError no longer has a line of its own ("[metrics] boto3 not
available — skipping CloudWatch write"). boto3 is a pinned dependency;
should an import fail, the general line reports it: "[metrics]
CloudWatch Logs write failed (best-effort): <class>: <message>".
- The payload is read and serialised before the client is built. A
payload that json.dumps refuses therefore no longer leaves an empty
stream behind, and one that is not a dict fails before a client
exists. The stdout line is the same in both cases, and print_metrics,
the only caller, passes a dict whose values always serialise.
The error mirror suppresses a failure with contextlib.suppress instead
of try/except/pass, which ruff rejects (SIM105) around a single call; it
stays silent. server.py loses the contextlib alias that only these
writers used.
Tests: put_log_event against a stub client. The stream is created once,
an existing stream is tolerated and each call puts one event. Any other
failure, of CreateLogStream or of the put, reaches the caller.
AWS_REGION wins over AWS_DEFAULT_REGION, which is used when AWS_REGION
is not set.
With AGENT_REGISTRY_ID unset, makeRegistryClient told the operator to
"remove registry:// refs". Deleting an asset list from the Blueprint
does not do that: the list stays in the repository's record. The error
now names the two ways that work: declare the asset list as [] in the
Blueprint, or `bgagent repo onboard <repo> --unset <column>`.
Behaviour change: a task whose repository pins registry assets on a
stack without the registry fails with the new text. As a task records
it ("Hydration failed: Error: ...") it is 293 characters, under the 300
at which the Slack failure message cuts the reason.
docs/design/REPO_ONBOARDING.md called the CDK Blueprint the canonical path, described a write shape the construct no longer has, and listed props and columns that do not exist. It now describes the two writers of a repository's RepoTable record: `bgagent repo onboard` is the default way to register a repository and to change or remove a setting, and a Blueprint is the checked-in declaration. Both make one merging UpdateItem. The comparison table, the BlueprintProps listing, the RepoConfig schema (17 settings) and the table of steps show what the construct and the record hold. The record of a removed Blueprint expires 30 days after the synthesis of the last deploy that still contained it, not 30 days after the removal. - ADR-017 gets an amendment in two points (plain settings; Cedar policies and module pins), and its Date line names it. The amendment says what stays with a deploy, and that the audit follow-up of decision 3 is due and still open. - SECURITY.md, CEDAR_HITL_GATES.md section 12: per-repo Cedar policies are written by operators, through a deploy or with operator credentials. - SECURITY.md, COMPUTE.md: an agent whose Cedar engine cannot be loaded does not start, and a call that Cedar cannot evaluate is denied. - API_CONTRACT.md, ARCHITECTURE.md: a repository is registered with `bgagent repo onboard` or a Blueprint. - SURFACE_AGNOSTIC_ORCHESTRATION.md names the three places that branch on a surface: the reconciler's iteration reply, the heartbeat sweep and the release. A further surface edits only the heartbeat sweep, and only to get a heartbeat on its iteration replies. - REGISTRY.md: with the registry switched off, what counts is the repository's record, and how a pinned list is detached from it. - ORCHESTRATOR.md: the onboarding row names `bgagent repo onboard` beside the Blueprint, and the budget row says per task or per repo. - SURFACE_AGNOSTIC_ORCHESTRATION.md also names the stranded sweep among the handlers that are given each surface's registry. No behaviour change: documentation only.
When RepoTable holds no active repository, bgagent platform doctor reported "No active repos in RepoTable. Register a Blueprint and redeploy." It now reads "No active repos in RepoTable. Run `bgagent repo onboard <owner/repo>`, or register a Blueprint and redeploy."
The guides, the CLI README and the plugin skills describe the command as it is now: it registers a repository, sets every per-repo setting but egress domains, and removes one with --unset. A Blueprint is the checked-in alternative and the only way to add egress domains. - USER_GUIDE: onboarding is the command or a Blueprint. The per-repo table gains build_command, lint_command, approval_gate_cap, cedar_policies and the three registry lists, with the flag and the Blueprint property of each setting. It says what still takes a deploy, and that a setting a Blueprint declares is changed in the Blueprint, because every deploy writes it again. "Removing a per-repo override" is --unset <column> instead of a raw aws dynamodb update-item. The budget table has a row for the CLI. repo onboard is among the operator commands, with the IAM actions it needs. - QUICK_START, DEVELOPER_GUIDE: a repository's own settings are flags of the same command (--build-command for a repository without mise). A Blueprint is a definition in cdk/src/blueprints/definitions.ts, not a construct in the stack: only definitions feed the DNS allowlist. - CEDAR_POLICY_GUIDE: rule files can be passed with --cedar-policy-file, all of a repository's files in one command, because the files given replace the stored rules; the example is a definition. - DEPLOYMENT_GUIDE, CEDAR_POLICY_GUIDE: for registry pins the repository's record counts, and how a list is detached. - cli/README: every flag of repo onboard, --unset, the three words the command prints, list flags replace, what is refused. - Skills: onboard-repo and deploy prefer the command for everything but egress domains and name what needs a redeploy on either path; the Blueprint example uses the real nested properties. troubleshoot removes a stale model_id with --unset. - docs/verification/README: the focused worker checks use mise //agent:testf. - DEPLOYMENT_GUIDE, QUICK_START: the root resource counts of the minimal profile and of the legacy topology are the measured ones (287 and 431). - USER_GUIDE: a changed setting applies to tasks that start after it, one that is waiting in the queue included. - README, the plugin's README and its cdk-expert agent name the command beside the Blueprint. No behaviour change: documentation only.
TaskApi keeps the Cognito authorizer it creates as the public member
cognitoAuthorizer. LinearIntegration, JiraIntegration and
SlackIntegration take a required prop linkAuthorizer and put their
Cognito routes behind it: POST /linear/link, DELETE
/linear/workspaces/{slug}, POST /jira/link and POST /slack/link. The
stack passes taskApi.cognitoAuthorizer to the three. A construct no
longer creates an authorizer of its own on the same user pool. The
userPool prop stays: the budget check looks up a user's groups in it.
Behaviour: a stack that deploys a tracker loses that tracker's
AWS::ApiGateway::Authorizer (LinearIntegrationLinearCognitoAuthorizer,
JiraIntegrationJiraCognitoAuthorizer,
SlackIntegrationSlackCognitoAuthorizer), the four methods reference
TaskApiAuthorizer, and the API gets a new deployment that the stage
points at. The removed authorizers had the configuration of the one
that stays (same pool, Authorization header, default cache time), so
the routes accept the same tokens; they now share that authorizer's
result cache. No table, secret, bucket, pool or log group changes, and
a stack without a tracker synthesizes the same template. The root
template has one resource fewer per tracker (471 to 468 in the widest
profile).
Code that builds one of the three constructs without linkAuthorizer no
longer compiles.
Tests: every suite that builds one of the constructs creates an
authorizer on its test pool and passes it. New cases: each construct
suite checks that its Cognito routes reference the authorizer handed
to the construct and that the stack holds no other; the stack suite
checks that the four routes reference the authorizer of TaskApi, the
only Cognito authorizer of the root template.
The complexity record of the stack's constructor is lowered from 120
to 116, which is what the constructor measures.
PR_WORKFLOW_IDS in config.py, and a literal copy of it in the server's pre-check, listed the three workflows that work on an existing pull request. Each workflow file already says so: its required_inputs name pr_number under all_of. The orchestrator decides by that rule (workflowUsesPr in cdk/src/handlers/shared/workflows.ts). Workflow.uses_pull_request applies the same rule on the agent side. build_config sets is_pr_workflow from it, and _validate_required_params requires pr_number by it. The table and its copy are deleted: the agent keeps no list of pull-request workflows. The six shipped workflows keep the values they had. The id tables for the clarification tool (runner.py) and for the Cedar principal (workflow/loader.py) stay. _validate_required_params loads the workflow once and reads from it both whether the task needs a repository and whether it needs a pull-request number. Tests: the three tests of the table became one test of uses_pull_request over the six shipped workflows. Two tests give build_config and the pre-check a workflow whose id is none of the three and whose all_of names pr_number after a second input; they fail if either reads an id table, or if the rule compares all_of with the exact list [pr_number]. One test pins the pre-check's answer for an id without a workflow file. Behaviour changes, all for a task whose workflow file cannot be loaded: - The pre-check gives no verdict (an empty list) where it assumed that a repository is required. When the record of such a task lacks a field the old check asked for (the repository; the pull-request number for one of the three ids of the table; an issue number or a description for any other id), POST /invocations and the MicroVM /run hook now accept the task; they used to answer 400 TASK_RECORD_INCOMPLETE. The pipeline thread then fails the task, as it already did when the record was complete: build_config raises the loader's error, the backup write records "Background pipeline thread: WorkflowValidationError: <loader message>" and /ping answers 503. The return carries a suppression of py-silent-success-masking that gives this reason. - The warnings "could not resolve requires_repo for ...; assuming repo required" and "workflow loader unavailable for ...; assuming repo required" are no longer written. - An ImportError of the workflow package is no longer caught in the pre-check: the package and its dependencies are part of the image. A task whose workflow file loads is checked as before. docs/design/WORKFLOWS.md says in the row of required_inputs that a workflow which names pr_number under all_of is treated as working on an existing pull request.
agent/workflows/schema/workflow.schema.json described the kind of a step as "Dispatches to a registered step handler." Since the handlers for clone_repo, verify_build, verify_lint, ensure_pr and post_review were deleted, the runner has a handler for three of the eight kinds: hydrate_context, run_agent and deliver_artifact. The description is now "The pipeline phase this step declares." No behaviour change: a description string is an annotation that validation ignores.
Comment and docstring text in 40 files of cdk/ and agent/. No statement, type or test changes, and no behaviour change. The comments named, as existing, code that earlier commits of this branch deleted: - the Python copy of the registry client, grammar and resolver (registry/ref.ts, resolver.ts, agent-registry-client.ts, types.ts and the four registry suites); - the bedrock-agentcore SDK bridge in the agent (agentcore-strategy.ts, compute-strategy.ts, task-orchestrator.ts); - checkRepoOnboarded (create-task-core.test.ts); - the email dispatcher of the fan-out (fanout-consumer.ts, slack-notify.ts, task-events-table.ts, approval-metrics-publisher.ts, stacks/agent.ts); - the Jira MCP placeholder, as "channel MCP" or "Jira MCP" (ecs-agent-cluster.ts, ecs-strategy.ts, jira-feedback.ts, the two construct suites, pipeline.py, agent/src/models.py, test_run_task_from_payload.py); - the Cedar parity contract (orchestrator.ts, test_policy.py, test_workflow_validation_corpus.py), the type PolicyRuleSummary (handlers/shared/types.ts) and the get-policies handler (rate-limit.ts); - the fallbacks for a workflow file that does not load (handlers/shared/workflows.ts, pipeline.py, test_pipeline_post_hook_gates.py); - the step handlers for clone, verify, pull request and review (pipeline.py, pr-review-v1.yaml, deliverers.py, test_pipeline_workflow_seam.py); - the re-export shim of entrypoint.py (progress_writer.py, prompts/base.py, scripts/diagnostics/test_subprocess_threading.py). Three more corrections. A comment in linear-remove-workspace.test.ts loses line numbers of cli/src/commands/linear.ts that were wrong, and that file and linear-remove-workspace.ts no longer cite a line of linear-integration.ts. The comment above APPROVAL_GATE_CAP_MIN in handlers/shared/types.ts now says that the CLI mirrors the two bounds as literals and that scripts/check-types-sync.ts compares them.
The tables in AGENTS.md and in the developer guide say where the code is. Nothing listed what has to change together. Each package guide now has a section "Recipes" for that, each step with its path: - cdk/AGENTS.md: "Add a REST endpoint", "Add a scheduled job" and "Add a tracker integration" (the construct, the stack wiring, the handlers, the shared handlers that choose a tracker by name, the shared places that still need an edit, the resource ceiling, the CLI, the checks before a pull request) - cli/AGENTS.md: "Add a command" - agent/AGENTS.md: "Add a workflow" (the file, the prompt, the descriptor, and the places keyed by a workflow's id in the agent and on the platform) AGENTS.md gets a row "Tracker integration" in "Where to make changes" that points at the tracker recipe. Documentation only: no behaviour changes.
docs/research/architecture-simplification.md records the four questions this branch answers (integrations, the policy engine on the CDK side, Strands Box, simplification and runtime configuration): what was found on the base, what was chosen and what was rejected, the decisions made on the owner's behalf with their commits, what was deferred and when to look again, what was found and not changed, and what was and was not verified. No behaviour change: documentation only.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers four questions about the project's structure and implements the answers: shared integration code, one Cedar engine, and per-repository settings written by the CLI without a deploy.
BREAKING CHANGE:
GET /v1/repos/{repo_id}/policiesand the commandbgagent policiesare removed inside/v1, without an alias.Area
cdk— infrastructure, handlers, constructsagent— Python runtime / Docker imagecli—bgagentclientdocs— guides or design sources (docs/guides/,docs/design/)tooling— rootmise.toml, scripts, CI workflowsAlso
contracts/, three files ofweb/, the rootAGENTS.md,CONTRIBUTING.mdandREADME.md, and.abca/commands/review_pr.md. No file under.github/changes.Related
Closes #1103
Fifteen open pull requests change files that this branch changes. By files in common on 2026-11-27: the draft #1092 (285), #1086 (25), #1101 (4), #1093 (3), and eleven more with nineteen or fewer. No merge order is fixed: whichever merges later redoes its hunks in the shared files. Two of them change what this branch changes too: #1093 answers #1091 by carrying the five dropped fields forward in the write that replaces the row, where e4c58ad sends a merging
UpdateItem, and #1086 removes the same ECS override as 5e10813.Decision records, under
docs/decisions/: ADR-028 (one Cedar engine), ADR-029 (OS sandbox deferred) and the amendment of ADR-017 (per-repository settings by CLI).Changes
The branch is 61 commits, one change each, and a last commit with the research note
docs/research/architecture-simplification.md. Without the note (git diff --shortstat origin/main...0c80e4cc): 336 files changed, 6,632 insertions and 13,652 deletions. Nothing was deployed. The pull request stays a draft until a maintainer has decided the points under "Decisions for the maintainer".The four questions
Channel, whose registry stays, and the newFeedbackTracker.bgagent repo onboardsets or removes 16 of a repository's 17 settings without a deploy; egress domains and IAM grants still take one. Code that nothing reaches is deleted.What changes
cdk/src/constructs/integration-parts.ts(the integration tables,FeedbackTracker.grantFeedback) andtask-creation.ts(task-creation wiring); incdk/src/handlers/shared/,webhook-hmac.ts(signature check),webhook-dispatch.ts(dedup and dispatch),account-link.ts(link handlers),tracker-intake.ts(intake helpers) andattachment-store.ts(screen and store). The Linear processor creates a task from a comment in one function instead of four places (432142d). Removed: the Slack adapter ofChannel, the email stub, functions that only tests called.CedarWasmLayer,@cedar-policy/cedar-wasmandcontracts/cedar-parity/. The user guide lists the 11 built-in rule ids.bgagent repo onboardand theBlueprintsend one mergingUpdateIteminstead of replacing the record.cli/src/repo-settings.tsgives each of the 16 settings a flag, and--unset <column>removes one.bedrock-agentcoreSDK, the Jira MCP placeholder, five step handlers of the workflow runner, the re-export shim ofentrypoint.py.cdk/AGENTS.md(REST endpoint, scheduled job, tracker integration),cli/AGENTS.md(command) andagent/AGENTS.md(workflow).mise //<package>:testf -- <path>runs one test file in cdk, cli, web and agent. Removed: the task//cdk:bundle, which did nothing, andscripts/ci-build.sh, which nothing ran. Five of the seven shared modules have their own suite (webhook-dispatch.tsandaccount-link.tsare tested through their callers); two emulator suites execute the merging write.Decisions for the maintainer
Each commit named here changes behaviour, IAM or a public surface; its message has the detail. "Alone?" says whether the commit can be reverted by itself: "yes" when a trial revert on the branch head (
git merge-tree --write-tree --merge-base=<c> HEAD <c>^) applies without a conflict. No reverted tree was built or tested./v1:GET /v1/repos/{repo_id}/policiesandbgagent policiesare removed without an alias; a stack update deletes the route's 11 resources and, with ea09b5e, the Lambda layer and the stack outputCedarWasmLayerArn.WebhookCreateTaskFngains put and delete on the attachments bucket's objects, asCreateTaskFnhas; storing an inline attachment was denied.s3:GetObject*,s3:GetBucket*ands3:List*on the attachments bucket and keeps put and delete, as Linear's.bgagent-jira-oauth-*and, with the Linear identity vault, its token grants. It then settles Jira epics as it does Linear's, old unsettled ones included.repo onboardneedsdynamodb:UpdateItemon RepoTable, notPutItem; the Blueprint's custom resource losesPutItem. The command printsonboarded,updatedorre-activated, and its JSON output gainschange.--mcp-serverand--skill.--cedar-policy-fileand--cedar-policy-moduleby hand[]; leaving it out no longer detaches the pins.cedarpycannot be imported (every tool call was denied). For such a workflow file the agent's server accepts a task whose record lacks a required field, where it answered400 TASK_RECORD_INCOMPLETE, and the pipeline fails it (282eccb).DELETE /linear/workspaces/{slug}) use the API's own Cognito authorizer: each deployed integration loses its authorizer, and the API gets a new deployment.Smaller changes:
repo onboardrefuses a bad or empty flag value.dispatched.jira-serverentry in a Jira task's.mcp.json.entrypoint.pyre-exported and five unreached step handlers.bgagent repo onboard.linkAuthorizerof 92695dd: members and props of constructs. A fork that uses a removed member or prop, or omits a required one, no longer compiles.Of these, ec09e34, 41a9412, 93daeec, 06670eb, f5b317b, abe7e8a and 9d413b1 conflict on a trial revert. The refactor commits name in their messages the differences they make, among them log fields, the order of policy statements and of environment variables, one consistent read and, in the Linear comment paths (432142d), one read made earlier.
Also: the guides name
bgagent repo onboardfirst and a Blueprint as the checked-in alternative (f7a567a),docs/design/REPO_ONBOARDING.mdcalls the command the default way to register a repository (22c20e3), and the amendment of ADR-017 says that the audit follow-up of its decision 3 is therefore due and open. Two leftovers:.github/dependabot.ymlstill names@cedar-policy/cedar-wasm, andcli/src/setup-ui.tsstill listsCedarWasmLayeramong the construct ids of its progress view.Verification
On 0c80e4c, the last commit before the research note:
mise run buildandmise run securityexit 0, with the cross-package checks, the masking scan and the image scan.mise run test:integration): 33 cdk, 9 cli and 44 agent tests.cedarpy4.12.2 and withoutbedrock-agentcore.mise //cdk:censuspasses for its 142 named profiles. Againstmain: no stateful resource is added, removed or retyped; every profile loses the 12 resources of the policy listing and the Cedar layer, the stack outputCedarWasmLayerArn, and one Cognito authorizer per deployed integration; the API deployment is replaced; no IAM policy changes in content beyond those in the table above; the widest root template goes from 483 resources to 468. The full run predates the last edits of the branch; 13 profiles synthesized after them differ only in the image URIs and in the synthesis time that a Blueprint's custom resource carries.Not verified: nothing was deployed and no call was made to AWS, so what a stack update does is read from templates, and the census sees no handler code. The emulator says nothing about permissions. The 42 cdk and 11 agent tests that need DynamoDB Local were skipped, as in every local build; CI runs them. No GitHub workflow had run on the branch before this pull request; CodeQL has no local gate, so its run here is the check. No merge with any pull request named under "Related" was tried, and nothing of Strands Box was run.
How to review
The commits build on each other in order. Read the research note first, then by area; each commit is named once:
08fe0a1 changes comments and docstrings only (40 files) and is meant to be dropped when the branch is rebased over #1092. A rebase changes the hashes given here.
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.