Description
Doc area
Developer guide (docs/guides/DEVELOPER_GUIDE.md or synced site)
Describe the issue
Non-blocking, follows the existing pattern for every other optional Blueprint field (maxTurns, modelId, systemPromptOverrides all behave identically): because the onUpdate UpdateExpression only SETs the attribute when the prop is present, removing maxBudgetUsd from a Blueprint and redeploying leaves the old max_budget_usd value in the DynamoDB row — the repo keeps its budget cap until someone deletes the attribute out-of-band. Same story on the CLI side: repo-onboard.ts preserves an existing value. Not a defect in this PR (fixing it would mean REMOVE-clause plumbing across all optional fields), but if the docs ever grow a "how do I unset a per-repo budget" question, this is the answer — worth a line in a future docs pass or a tracked issue.
Affected docs
Suggested change
No response
Activity
laithalsaadoon commentedon Aug 14, 2026
Follow-up analysis from the review thread that spawned this issue — what clearing mechanism already exists, where the fix and the docs belong, and what the docs currently say (verified on
17cd942, the PR #763 head).The repo already has a clearing mechanism — for lists
The precedent is in
cdk/src/constructs/blueprint.tsitself. For the three registry asset fields (#246), onUpdate computes which lists are now empty and appends aREMOVEclause instead of just omitting them fromSET:emptyAssetFields()/buildRemoveClause()/buildRemoveNames()—blueprint.ts:487-505cdk/test/constructs/blueprint.test.ts:431-449, including the exact clauseREMOVE #cedar_policy_modules, #skills.So the code fix (if wanted beyond docs) is mechanical: extend the same pattern to the optional scalars — when
maxBudgetUsd/maxTurns/modelId/systemPromptOverrides/pollIntervalMs/ etc. areundefinedat onUpdate, add the attribute to the REMOVE clause. That makes the Blueprint fully declarative: the construct's props become the whole truth of the row.One design question it raises: mixed ownership.
bgagent repo onboardalso writes these rows and deliberately preserves an existing budget on re-onboard (cli/src/repo-onboard.ts:116). A declarative CDK Blueprint would clobber a CLI-set value on redeploy. The asset lists already behave declaratively, so extending to scalars makes the construct consistent rather than introducing a new hazard — but the ownership rule ("once a repo has a CDK Blueprint, CDK owns the row") should be stated wherever this lands.Where the documentation belongs
Two homes, one per audience:
docs/design/REPO_ONBOARDING.md(~line 82, the lifecycle paragraph)PutItem; update =SETpresent props (+REMOVEfor cleared asset lists, today); which fields are stickydocs/guides/USER_GUIDE.md→ "Where can I setmax_budget_usd?" (+ Starlight mirrorcustomizing/Per-repo-overrides.md)Is it documented anywhere today? No — and one existing sentence overstates
Grepped the full docs tree: the SET-vs-REMOVE asymmetry appears only as the code comment and the tests, never in any Markdown. Even the #246 REMOVE behavior for asset lists never made it into
REGISTRY.mdor the onboarding doc.Worse,
docs/design/REPO_ONBOARDING.md:82currently says:That is only true for onCreate (full
PutItem) and for props that are present. For an optional prop you removed, the onUpdate path does not overwrite anything — the old value survives.Suggested resolution (two legs)
REPO_ONBOARDING.md:82lifecycle sentence to state the actual update semantics, and add the "how do I unset" line to the User Guide budget section + mirror. Runmise //docs:sync.blueprint.test.ts:431-449, and decide/document the CDK-vs-CLI row-ownership rule explicitly.rkumarus-aws commentedon Sep 1, 2026
Hi — I'd like to take this on. I'll add documentation explaining how to clear previously set Blueprint attributes (maxBudgetUsd, maxTurns, etc.) in the Developer Guide. Requesting the approved label to proceed with implementation.
krokoko commentedon Nov 24, 2026
Fixed in #1075, please reopen if you still face any issue, thanks !