chore: add agents_allowed to templates by ethanndickson · Pull Request #27284 · coder/coder · GitHub
Skip to content

chore: add agents_allowed to templates - #27284

Merged
ethanndickson merged 6 commits into
mainfrom
feat-coderd-database-agents-allowed
Aug 6, 2026
Merged

chore: add agents_allowed to templates#27284
ethanndickson merged 6 commits into
mainfrom
feat-coderd-database-agents-allowed

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Jul 16, 2026

Copy link
Copy Markdown
Member

Relates to CODAGT-713

This adds templates.agents_allowed as a default-true, auditable template attribute, along with nullable database filtering. Migration 000562 translates the effective legacy agents_template_allowlist state for existing templates: a valid nonempty list allows matching templates and blocks the rest, missing or empty values leave templates allowed, whilst corrupt values fail closed by blocking all existing templates. As per the linear issue, new templates deliberately default to allowed under the per-template model.

This is the database-only first PR in the stack. #27285 makes the field authoritative in the API and chatd whilst temporarily retaining the compatibility routes needed by the shipped frontend. Later PRs migrate the UI, remove the legacy storage, routes, SDK types, and utility, then add CLI flags.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@linear-code

linear-code Bot commented Jul 16, 2026

Copy link
Copy Markdown

CODAGT-713

@ethanndickson ethanndickson changed the title feat(coderd/database): add agents_allowed to templates chore(coderd/database): add agents_allowed to templates Jul 16, 2026
@ethanndickson
ethanndickson marked this pull request as ready for review July 16, 2026 04:41
@ethanndickson

Copy link
Copy Markdown
Member Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-07-27 10:22 UTC by @ethanndickson
Spend: $59.04 / $100.00

Review history
  • R1 (2026-07-16): 17 reviewers, 4 Nit, 1 Note, 2 P3, COMMENT. Review
  • R2 (2026-07-27): 14 reviewers, 6 Nit, 2 Note, 1 P1, 2 P3, REQUEST_CHANGES. Review
  • R3 (2026-07-27): 11 reviewers, 6 Nit, 2 Note, 1 P1, 2 P3, APPROVE. Review

deep-review v0.9.0 | Round 3 | 6f2011a..890a45a

Last posted: Round 3, 11 findings (1 P1, 2 P3, 6 Nit, 2 Note), APPROVE. Review

Finding inventory

Finding inventory - PR 27284

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Merged into CRF-4 (same surface: untested error path is one instance of the malformed-value class) 000544_...up.sql:26 Null-template-ID RAISE EXCEPTION guard untested R1 Netero, Bisky No
CRF-2 Nit Author fixed (668c2e9) 000544_...down.sql:1 Down comment hard-references nonexistent migration 000545 R1 Netero, Gon Yes
CRF-3 Note Author accepted R2 (DB-only slice; callers land in #27285) queries/templates.sql:80 New agents_allowed filter has no production caller yet (wired upstack) R1 Netero, Pariston Yes
CRF-4 P3 Author fixed (668c2e9); panel to verify 000544_...up.sql:18 Malformed/non-array/invalid-JSON allowlist aborts migration mid-upgrade with cryptic error; migration fails-closed while runtime fails-open; error paths untested R1 Knuckle P3, Meruem P3, Hisoka, Knov, Bisky, Pariston Yes
CRF-5 P3 Author accepted R2 (intentional product decision) 000544_...up.sql:1 DEFAULT true reverses restrictive-allowlist policy for templates created after upstack cutover; needs human product decision R1 Mafuuu P3, Pariston P3, Knuckle Yes
CRF-6 Nit Author fixed (668c2e9) querier_test.go:974 allowAllPreparedAuthorized reimplements coderdtest.FakeAuthorizer (already imported) R1 Robin Yes
CRF-7 Nit Author fixed (668c2e9) querier_test.go:929 "blocked" case relies on implicit Bool:false; spell it out to match sibling R1 Bisky Yes
CRF-8 Nit Author fixed (668c2e9) 000544_...up.sql:30 Backfill line: chained assignment reads as two comparisons and the block-everything-not-listed policy is undocumented R1 Gon, Leorio Yes
CRF-9 P1 Author fixed (retitled PR, R3) enterprise/audit/table.go:134 Red title CI check: PR-title scope coderd/database does not cover enterprise/audit/table.go + docs; blocks merge R2 Mafu-san P1, Kite P1 Yes
CRF-10 Nit Author fixed (890a45a) 000552_...up.sql:22 Inner RAISE EXCEPTION messages duplicate the config key that the outer WARNING already prepends R2 Leorio Yes
CRF-11 Nit Author fixed (890a45a) migrate_test.go:1704 Test case name "empty configuration" is vaguer than siblings; rename to "empty string" R2 Gon Yes
CRF-12 Note Author fixed (890a45a) migrate_test.go:1732 Migration subtests share one DB; a subtest failing before its downSQL buries following subtests with duplicate-column errors R2 Komugi Yes
CRF-13 Nit Open PR body Description still cites "Migration 000544" after the R3 renumber to 000552 (squash-merge would bake the wrong number into history) R3 Mafu-san (rated P3) No (review body)
CRF-14 Nit Open commit 890a45a subject Commit subject feat(coderd/database): ... retains the scope defect CRF-9 fixed on the PR title (excludes audit/table.go + docs) and the feat/chore type mismatch; inert under squash-merge R3 Leorio, Mafu-san No (review body)

Contested and acknowledged

CRF-3 (Note, queries/templates.sql:80) - filter has no production caller

  • Finding: The new agents_allowed filter param is set only by tests; no production code passes it. Ships dormant under a no-follow-up assumption.
  • Author defense (R2, PRRC_kwDOGkVX1s7WMXEw): Intentional. This PR provides the DB capability without changing production behavior. Production callers (the agents-allowed: template search filter and chatd's list_templates query) land in upstack feat: add per-template Coder Agents access control #27285. Keeping this slice database-only preserves the reviewable stack boundary.
  • Author accepted: Author (ethanndickson) confirms the dormant capability is deliberate stack decomposition. Panel to confirm the defense holds against the current code.

CRF-5 (P3, 000544_...up.sql:1) - DEFAULT true inverts restrictive-allowlist policy

  • Finding: A nonempty legacy agents_template_allowlist is deny-by-default (future templates blocked until added). Backfill snapshots existing rows correctly, but the static column DEFAULT true governs future inserts, so after the upstack cutover a deployment that restricted agents silently flips to default-allow for new templates. Flagged as needing a human product decision.
  • Author defense (R2, PRRC_kwDOGkVX1s7WMWvv): Intentional product decision. Migration preserves the effective legacy state for existing templates; new templates default to allowed under the new per-template model. The deployment-wide allowlist's incidental deny-future-templates behavior is deliberately not carried forward. Upstack API/UI/CLI provide supported ways to disable Agents per template. (Same concern also raised independently by Codex; same author reply.)
  • Author accepted: Author (ethanndickson, a human maintainer) explicitly accepts default-allow for new templates as the intended posture. This satisfies the "human decision needed" ask from R1. Panel to confirm the code matches the stated decision (existing rows backfilled, new rows default true).

Round log

Round 1

Netero first pass + 17-reviewer panel. Base 21d0824..head e87c600. Effective +341/-1, 8 files, 77% test density. Law skipped (341 < 1000).
Netero: 1 P3, 1 Nit, 1 Note. Panel: no P0/P1. Two P3 clusters converged: (a) malformed-allowlist migration abort / fail-closed vs fail-open (Knuckle+Meruem P3, +4 Notes) -> CRF-4, subsumes CRF-1; (b) DEFAULT true inverts restrictive-allowlist policy post-cutover (Mafuuu+Pariston P3, Knuckle Note) -> CRF-5. Three Nits (CRF-6/7/8), CRF-2 corroborated by Gon. No-finding: ging-go, takumi, kurapika, chopper, kite. Process (body): CI red 5 checks untriaged (Mafu-san P2), commit type feat vs PR title chore, scope excludes audit/table.go + docs. Event: COMMENT (no P0/P1). Reviewed against 21d0824..e87c600.

Round 2

Churn guard: PROCEED (5 addressed, 2 acknowledged, 0 silent). Author pushed fix commit 668c2e9 addressing CRF-2/4/6/7/8; CRF-3 and CRF-5 accepted as intentional by the human maintainer. Codex also raised the CRF-5 concern; same author reply. Effective +402/-1, 8 files, 78.4% test density. Law skipped (402 < 1000). Panel re-review to verify fixes (esp. CRF-4 EXCEPTION/fail-open block + new tests). Reviewed against 21d0824..668c2e9.
Panel (Netero + 14): all R1 fixes verified against current code (Knuckle, Meruem, Kurapika, Hisoka, Bisky, Komugi, Chopper, Mafuuu, Mafu-san, Pariston, ging-go, Kite, Gon, Leorio). CRF-4 fail-open scoping confirmed correct on live Postgres (parse in EXCEPTION block, UPDATE outside; real DB errors still abort). New: CRF-9 P1 (Mafu-san+Kite verified) the red title CI check is the R1 title-scope concern materialized (scope coderd/database excludes audit/table.go + docs), NOT the feat/chore type (chore is accepted by the title job). CRF-10/11 Nits, CRF-12 Note. Body notes: snapshot-drift window (Pariston), corrupt-data fail-open is permanent after cutover (Hisoka), all-stale-list full-block untested (Hisoka), commit type feat vs chore cosmetic (Mafu-san/Leorio), fix commit subject uninformative (Leorio). Event: REQUEST_CHANGES (CRF-9 P1, convergent + verified, blocks merge).

Round 3

Churn guard: PROCEED (4 addressed, 0 silent). Author fixed CRF-9 (retitled PR to chore: add agents_allowed to templates, dropping the scope; CI no longer red), CRF-10 (inner raises name only the shape), CRF-11 (rename to empty string), CRF-12 (down migration + delete moved to t.Cleanup). PR was rebased onto new base 6f2011a (was 21d0824) and the migration renumbered 000544 -> 000552 to avoid collision. Codex re-reviewed 668c2e9, no major issues. Effective +404/-1, 8 files, 78.5% test density. Law skipped (404 < 1000). Panel re-review to verify the 4 fixes + the rebase/renumber consistency (migrationVersion const, generated artifacts). Reviewed against 6f2011a..890a45a.
Panel (Netero + 11: Knuckle, Komugi, Bisky, Hisoka, Mafuuu, Mafu-san, Pariston, Gon, Leorio, ging-go, Kite): all 4 R3 fixes verified against current code and the renumber confirmed consistent (000552 next free slot, migrationVersion=552, generated artifacts + dump.sql aligned, no stray 000544, go build clean). Multiple reviewers ran TestMigration000552 green on live Postgres. Pariston's all-stale-list-untested Note reconciled by Bisky as structurally the same false branch already covered -> dropped, not a finding. New: CRF-13 Nit (PR body still says 000544; Mafu-san rated P3, orchestrator set Nit as documentary, same class as CRF-2) and CRF-14 Nit (commit subject retains scope defect + feat/chore mismatch, inert under squash-merge). Both metadata/prose, surfaced in the review body (no code line). Confirmation replies posted on CRF-9/10/11/12 threads. Event: APPROVE + dismiss prior REQUEST_CHANGES (all P0-P3 resolved/accepted; only two metadata Nits remain).

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e87c6004b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/database/migrations/000563_template_agents_allowed.up.sql

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clean, tightly scoped slice: it lands the templates.agents_allowed column, backfills it faithfully from the deployment-wide allowlist, recreates template_with_names, adds a three-state nullable filter, and updates the audit table and generated docs in the same PR. Test density is 77% and the two new tests were run green against real Postgres by several reviewers. Backfill semantics were verified end to end against the runtime allowlist contract (isTemplateAllowed / chatTemplateAllowlist) and match exactly, and the authorization boundary is preserved: the filter is ANDed inside GetAuthorizedTemplates and cannot broaden access.

Severity count: 2 P3, 1 Note, 4 Nits. No P0/P1, so this is a comment, not a change request.

Both P3s are latent at this HEAD (nothing enforces the column yet) but are baked in here and cheapest to decide now:

  • CRF-4: the migration trusts the stored allowlist shape; a malformed value aborts the upgrade with a cryptic Postgres error, diverging from the runtime's tolerate-and-allow-all behavior.
  • CRF-5: DEFAULT true inverts the deny-by-default posture of a restrictive allowlist for templates created after the upstack cutover. This needs a human product decision, not an agent's acceptance: confirm default-allow for new templates is intended, or make the default deployment-controlled.

Process items (not blocking, but worth handling before merge):

  • CI is red: 5 checks are failing and none are triaged on the PR. The PR's own new tests pass locally, so the added code is not the obvious culprit, but a red pipeline needs to be identified and either fixed or shown unrelated before merge.
  • The single commit is typed feat(coderd/database) while the PR title is chore(coderd/database). Pick one deliberately; the type drives changelog classification.
  • The coderd/database scope does not contain every changed file (enterprise/audit/table.go, docs/admin/security/audit-logs.md). Broaden or omit the scope per AGENTS.md.

Two sequencing notes worth tracking outside this PR: the backfilled agents_allowed is a point-in-time snapshot, so any admin edit to the old allowlist between this migration and the cutover is silently lost; and the backfill has no WHERE deleted = false, so soft-deleted templates also get agents_allowed = false under a restrictive list (no runtime effect today).

Bisky on the tests: "this test suite is lovely. Table-driven migration backfill, a filter matrix, story-free Go all the way down. And this time the stones are real. I ran both."

🤖 This review was automatically generated with Coder Agents.

Comment thread coderd/database/migrations/000544_template_agents_allowed.up.sql Outdated
Comment thread coderd/database/migrations/000563_template_agents_allowed.up.sql
Comment thread coderd/database/migrations/000563_template_agents_allowed.up.sql
Comment thread coderd/database/migrations/000544_template_agents_allowed.down.sql Outdated
Comment thread coderd/database/querier_test.go Outdated
Comment thread coderd/database/querier_test.go
Comment thread coderd/database/queries/templates.sql
@ethanndickson ethanndickson changed the title chore(coderd/database): add agents_allowed to templates chore: add agents_allowed to templates Jul 16, 2026
@ethanndickson ethanndickson changed the title chore: add agents_allowed to templates chore(coderd/database): add agents_allowed to templates Jul 16, 2026
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@ethanndickson

Copy link
Copy Markdown
Member Author

/coder-agents-review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 668c2e9626

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2. The fix commit 668c2e9 is clean work. Every R1 code finding is resolved and the panel verified each against the current code, several on a live Postgres:

  • CRF-4 (fail-open) is fixed at the root: parsing and shape checks now run in a narrow inner BEGIN ... EXCEPTION WHEN others THEN RAISE WARNING ...; RETURN block, the UPDATE sits outside it, so corrupt legacy data leaves every template at the DEFAULT true while a genuine DB error on the write still aborts. Hisoka confirmed the only I/O left inside the swallow zone is none, so the scoping is tight, not incidentally tight. New subtests assert real per-template outcomes for invalid JSON, JSON object/scalar, invalid UUID, null element, and mixed valid/invalid, not just "no error".
  • CRF-8/CRF-2/CRF-6/CRF-7 verified fixed (parenthesized RHS + policy comment; no future-migration reference; coderdtest.FakeAuthorizer.Prepare reused; explicit Bool: false).
  • CRF-5 and CRF-3 match the accepted product decisions; a human maintainer owns the default-allow posture and the DB-only stack boundary.

One blocker, and it is the R1 process note come true rather than new work:

  • CRF-9 (P1): CI is red on the title check because the PR-title scope coderd/database does not contain enterprise/audit/table.go or docs/admin/security/audit-logs.md. Both are correctly included in the diff (the audit registration and generated docs are required for the new auditable column), so the title must widen, not the diff shrink. This is a one-line fix (drop the scope, e.g. chore: add agents_allowed to templates, or broaden it) and it is what turns CI green. Note this corrects the R1 body note: the failure is the scope, not the feat vs chore type; the title job accepts chore.

Requesting changes only to clear the red check. Two Nits and one Note below are optional.

Non-blocking notes for the record:

  • Commit type feat (head commit) vs PR title chore: cosmetic, does not fail CI, and squash-merge uses the PR title. Pick one deliberately.
  • The fix commit subject address agents_allowed review feedback names that treatment happened, not what changed; prefer something like fail open on corrupt agents_template_allowlist if intermediate commits survive.
  • Sequencing (outside this PR): the backfill is a point-in-time snapshot while site_configs stays authoritative until the #27285 cutover, so an allowlist edit made between the two deploys is dropped unless #27285 re-backfills (Pariston). And corrupt legacy data now fails open permanently: after the cutover removes the legacy storage, a malformed value at upgrade time bakes in all-allowed with only a migration WARNING to show for it (Hisoka). Both follow from the accepted CRF-4/CRF-5 decisions; flagging so they are understood as fail-open-and-forget.

Hisoka, on the fail-open block: "I came looking for a fight in the fail-open block. It held."

🤖 This review was automatically generated with Coder Agents.

Comment thread enterprise/audit/table.go
Comment thread coderd/database/migrations/000544_template_agents_allowed.up.sql Outdated
Comment thread coderd/database/migrations/migrate_test.go Outdated
Comment thread coderd/database/migrations/migrate_test.go
@ethanndickson ethanndickson changed the title chore(coderd/database): add agents_allowed to templates chore: add agents_allowed to templates Jul 27, 2026
@ethanndickson
ethanndickson force-pushed the feat-coderd-database-agents-allowed branch from 668c2e9 to 890a45a Compare July 27, 2026 10:18
@ethanndickson
ethanndickson requested a review from a team as a code owner July 27, 2026 10:18
@ethanndickson

Copy link
Copy Markdown
Member Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 3. All prior findings are resolved or accepted, and the fixes hold. Netero plus an 11-reviewer panel verified this round; several ran TestMigration000552TemplateAgentsAllowedBackfill green against live Postgres.

Verified:

  • CRF-9 (P1): the red title check is cleared. The PR was retitled to chore: add agents_allowed to templates (scope dropped), so the audit-table and docs files no longer fall outside a scoped path. CI is no longer red.
  • CRF-10/11/12: inner RAISE messages now name only the shape while the outer WARNING keeps the config-key context; the test case is renamed empty string; and the down migration plus the post-migration delete run in t.Cleanup (LIFO order verified) so a failed subtest no longer cascades duplicate-column errors.
  • Rebase and renumber (000544 -> 000552): consistent across every artifact. 000552 is the next free slot with no collision, migrationVersion = 552, and dump.sql, models.go, modelqueries.go, queries.sql.go, the audit table, and the generated docs all agree. go build ./coderd/database/... is clean and no stray 000544 reference survives.
  • CRF-4 fail-open and CRF-5 default-true remain closed by maintainer acceptance; the code still matches those decisions after the rebase.

Pariston flagged that the all-stale-allowlist full-block case is untested; Bisky reconciled it as the same id = ANY(parsed_ids) false branch already pinned by templateIDs[1], a structural sibling rather than a gap. Not a finding.

Two metadata Nits remain, neither blocking:

  • The PR description still calls this "Migration 000544" after the renumber to 000552. grep 000544 returns nothing in the tree, so the cited number does not exist; a squash-merge would bake it into the permanent commit message. One-token fix in the body. (Mafu-san rated this P3 for the squash-history permanence; recorded as a Nit here as a documentary fix in the same class as the earlier down-comment reference.)
  • The sole commit subject feat(coderd/database): add agents_allowed to templates still carries the scope defect CRF-9 just fixed on the PR title (enterprise/audit/table.go and docs/ are outside coderd/database) and the feat vs chore type mismatch. This is inert if the repo squash-merges (GitHub uses the PR title), so it only matters if intermediate commits survive; align it if so.

Dismissing the round 2 change request: the P1 blocker is fixed. Hisoka, after re-running the migration on live Postgres: "Boring survives. Silence is the rating."

🤖 This review was automatically generated with Coder Agents.

@ethanndickson
ethanndickson requested a review from mafredri July 27, 2026 11:03
@ethanndickson
ethanndickson force-pushed the feat-coderd-database-agents-allowed branch 2 times, most recently from 751984e to 9ca2c7e Compare August 4, 2026 04:28
@ethanndickson
ethanndickson requested a review from johnstcn August 4, 2026 11:42
@ethanndickson
ethanndickson removed the request for review from a team August 4, 2026 11:42
Comment thread coderd/database/migrations/000562_template_agents_allowed.up.sql Outdated
@ethanndickson
ethanndickson force-pushed the feat-coderd-database-agents-allowed branch 2 times, most recently from aa6d1c2 to ba41499 Compare August 4, 2026 16:17
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba414996f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/database/migrations/000563_template_agents_allowed.up.sql
Comment thread coderd/database/migrations/000563_template_agents_allowed.up.sql
@ethanndickson
ethanndickson force-pushed the feat-coderd-database-agents-allowed branch from ba41499 to 2946853 Compare August 5, 2026 05:53
@ethanndickson
ethanndickson force-pushed the feat-coderd-database-agents-allowed branch from 2946853 to 376f9a0 Compare August 6, 2026 03:31

ethanndickson commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

@ethanndickson
ethanndickson merged commit b3485d9 into main Aug 6, 2026
29 checks passed
@ethanndickson
ethanndickson deleted the feat-coderd-database-agents-allowed branch August 6, 2026 04:04
ethanndickson added a commit that referenced this pull request Aug 6, 2026
Relates to CODAGT-713

Depends on #27284

This makes the per-template `agents_allowed` field authoritative in the API and chatd. It adds optional create and metadata update fields with the intended default and omission semantics, supports `agents-allowed:` template search, includes the value in telemetry, and makes `list_templates`, `read_template`, and `create_workspace` read the template row directly. Existing-workspace retries remain idempotent, and blocked same-organisation templates return an actionable message.

The experimental `/template-allowlist` routes remain temporarily because the shipped AI Settings page still calls them, but they no longer control chatd enforcement. #27514 moves that page to per-template metadata, #27515 removes the legacy storage, routes, SDK types, and utility, #27517 adds the CLI flags, and #27518 updates the platform controls documentation for the per-template model, directly addressing CRF-5 and CRF-6. The stack is intended to merge as a unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants