Skip to content

Decision: should Governance be able to turn off the chat's project and agent proposals? #5379

Open

Description

@yannickmonney

Summary

Since #5363 (train 8d37319dc), a chat in the app offers read_project_settings and propose_project_settings to every person who may create or change projects (Editor, Developer, Admin, Owner). An organization cannot turn them off: the Chat tools policy only has switches for files, skills and code. The switch was left out on purpose and recorded under the chat spec's Not yet, because adding a key to that policy is not safe during a rolling deploy. This issue lays out why, and the ways around it. Part of epic #5371.

What the repository says today

  • chatToolsConfigSchema is .strict(), with files, skills and code (packages/shared/src/schemas/governance.ts:559-579, main 9be27c4e2).
  • A chat turn reads it with strict: true. A policy file that exists but cannot be read turns files, skills and code off until it is repaired (services/platform/backend/domains/chat/work-tools.ts:71-108, train a32fb1586; rule CHAT-R26, services/platform/backend/domains/chat/spec.md:423-429).
  • So an older image (during a rolling deploy, or after a rollback) that reads a file with a key a newer image wrote fails the strict parse, and turns off files, skills and code for the whole organization.
  • Each policy is a file of its own, read by type (policyTypeToFileBase(policyType), services/platform/backend/lib/org-config.ts:172-178, main). An image reads only the types it knows (POLICY_SCHEMAS, governance.ts:1427-1461).
  • There is a precedent for reading with a different schema than the one that writes: POLICY_READ_SCHEMAS reads model_access with storedModelAccessConfigSchema (governance.ts:1463-1466).
  • Who gets the tools today:
    • App sessions only, no send over the API (services/platform/backend/domains/chat/service.ts:170-188, train).
    • Only members whose role may edit projects (services/platform/backend/domains/chat/proposals.ts:343-358).
    • Nothing changes until the chat's owner applies a card (CHAT-R44).
  • The Not yet entry: services/platform/backend/domains/chat/spec.md:559-562 (train).

Constraints

  • An older image must keep reading a policy file that a newer image wrote.
  • CHAT-R26's fail-closed reading must still hold for a file that is really broken.
  • A new switch needs its row on the Governance page, strings in en, de and fr, and docs.

Options (no preference)

  1. Two releases. First the chat_tools reader accepts and ignores unknown keys (a read schema beside the strict write schema, as model_access has). A later release adds the new switch.
  2. A separate policy type, in its own file, which an older image never reads.
  3. A rule about roles ("which roles may use chat proposals") rather than an on/off switch, in a policy that already exists or a new one.
  4. No switch. The tools stay limited by role and by the click on Apply.

Questions

  • On or off by default, for organizations that exist and for new ones?
  • Should the switch cover read_project_settings (reads only) as well as proposals?

Related

Activity

  1. added
    priority: medium
    needs discussion
    improvement
    service: platform
    on Nov 5, 2026
  2. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    Decision

    Governance gets a switch for the chat's project and agent proposals: a new key, projects, in the existing Chat tools policy, shipped over two releases.

    Release N (reader first):

    • The chat_tools policy is read with a tolerant read schema that accepts keys this version does not know, like model_access.
    • Every save carries over the stored keys this version does not know; keys in the request win.
    • The merged config is what the settings plan shows and compares, and what is written. It is serialized with the read schema, not the strict write schema.
    • The write door refuses an unknown key unless it equals the stored value, so reading and writing back works. A stored unknown key set to null is removed.
    • The Governance page names kept keys, says they have no effect in this version, and offers Remove.
    • A file that is really broken (YAML that does not parse, not an object, a wrong type on a known key) still turns files, skills and code off (CHAT-R26).

    Release N+1 (the switch; not before release N is published):

    • projects (default true) is added to the policy.
    • Off: the chat is offered neither read_project_settings nor propose_project_settings.
    • A policy that cannot be read: also off.
    • While it is off, Apply on a pending card is refused with CHAT_PROPOSALS_OFF and the card stays open; Dismiss still works.
    • The Governance page gets a Projects row, with strings and docs in en, de and fr, and a spec rule.

    Answers

    • On or off by default? On, for existing and new organizations. A missing file or missing key means on; a policy that cannot be read means off.
    • Does it cover read_project_settings? Yes. One switch removes both tools: reading only serves drafting proposals and never shows more than the person can already open.

    Rationale

    A save replaces the whole file, and the editor always sends {files, skills, code}. So an older image would erase projects: false and turn proposals back on without anyone choosing it, unless the server carries unknown stored keys over. The settings API returns those keys on read, so the write door must accept them back unchanged, or a client that reads and writes back is refused. The plan must also use the merged config, so that it does not report a change that is not real. The serializer currently parses with the strict schema and must be switched to the read schema. A typo key in a hand-edited file is now ignored rather than turning everything off. The page names it and offers Remove, and broken files still fail closed. A separate policy file would split one concept in two for good. A role rule repeats the existing gate. No switch leaves organizations no way to turn the feature off.

    Implementation units

    1. Chat tools policy: read keys this version does not know, and keep them on write (train, M): the tolerant read schema, a merge, round-trip and removal helper in the policy writer, serialization through the read schema, a plan that uses the merged config, the Governance note with Remove (en, de, fr), CHAT-R26 wording, README, and a manual box.
    2. Chat tools: a Projects switch for the chat's project and agent proposals (train, M; only after the release carrying unit 1 is published): the key, the gate on the turn's settings tools, CHAT_PROPOSALS_OFF on Apply, the Governance row, en, de and fr strings and docs, a spec rule with the Not yet entry removed, manual boxes, and release notes saying not to roll back past release N.

    Cross-issue amendments (decisions taken together with #4877, #5411):

  3. added
    agent-ready
    and removed
    needs discussion
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyimprovementpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions