Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: require audit capture for chat settings - #28394

Merged
ethanndickson merged 2 commits into
mainfrom
ethan/codagt-720-fail-closed-chat-settings-audit
Aug 24, 2026
Merged

fix: require audit capture for chat settings#28394
ethanndickson merged 2 commits into
mainfrom
ethan/codagt-720-fail-closed-chat-settings-audit

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 20, 2026

Copy link
Copy Markdown
Member

Existing chat instruction setting handlers could complete a mutation without an audit event when advisory locking or old-state capture failed.

Make system prompt and plan mode instruction updates fail closed: baseline capture and mutation stay in one transaction, audit infrastructure failures reject the request without changing the setting, and focused tests cover lock, read, transaction, and write failures.

@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown

CODAGT-720

@ethanndickson ethanndickson changed the title fix(coderd): require audit capture for chat settings fix: require audit capture for chat settings Aug 20, 2026
@ethanndickson
ethanndickson marked this pull request as ready for review August 20, 2026 15:54
@ethanndickson
ethanndickson force-pushed the ethan/codagt-720-fail-closed-chat-settings-audit branch from 0efe4f2 to a82abed Compare August 20, 2026 16:03
@ethanndickson
ethanndickson force-pushed the ethan/codagt-720-fail-closed-chat-settings-audit branch from a82abed to 659ffc1 Compare August 24, 2026 09:21
@ethanndickson
ethanndickson force-pushed the ethan/codagt-720-fail-closed-chat-settings-audit branch from 659ffc1 to 5329ab9 Compare August 24, 2026 10:39
@ethanndickson
ethanndickson merged commit 2aba268 into main Aug 24, 2026
24 checks passed
@ethanndickson
ethanndickson deleted the ethan/codagt-720-fail-closed-chat-settings-audit branch August 24, 2026 10:53
ethanndickson added a commit that referenced this pull request Aug 24, 2026
Depends on #28394.

Audit changes to seven operational agent settings through a typed
`chat_operational_settings` resource. Each handler serializes baseline
capture and mutation with a per-setting advisory lock, keeps both
operations in one transaction, and records field-specific diffs.

Effective no-op requests now skip both the database upsert and the
success audit, including absent rows whose effective value is already
the default. The change also retains the allowlisted raw `site_configs`
query, updates generated audit and API surfaces, adds failure and
concurrency coverage, and reuses the existing AuditPage resource-filter
story pattern.

Relates to CODAGT-720.
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants