Skip to content

refactor(policy): remove stored workspace policies - #607

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-11467-remove-stored-workspace-policies
Oct 27, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-11467-remove-stored-workspace-policies

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Deleted stored workspace policies (workspace-policy/<name> artifacts a stored repository policy extended by id): sharedPolicySchema, WORKSPACE_POLICY_TITLE_PREFIX, storedPolicyPack, PolicySource.shared (contracts, triage comment header, hub responses, portal), the hub's shared-policy resolution and policy_shared_resolved log, the audit log's workspace-policy entries, the admin grant backfill's workspace-policy titles, the portal's ExtendedPolicyError, sharedPolicy in /api/integrations/pack-schema, shared in both mirror tool schemas, and exportPolicyFile's extended parameter.
  • extends accepts only a repository (owner/name, or Bitbucket PROJECT/slug), using the same pattern as a policy's repo, in the policy file schema and the override schema, so the validator, /policy/validate, the extension and the Action refuse anything else. A stored repository policy with extends reads as corrupt: "Only a policy file can extend another repository's policy."
  • Extending another repository's policy file is unchanged (extendedFilePack, resolvePolicy, policy.source.sharedFile).
  • Docs: ARCHITECTURE, PRODUCT (merge rules restated under Shared policies; who may change saved rules kept), IMPLEMENTATION, triage-contracts README, extension README, setup skill and the user manual describe only .corbits-triage.yml and extending another repository's file.
  • Production holds 0 workspace-policy/* artifacts and 0 stored repository policies with extends, so nothing migrates.

Verification

  • bun run check and bun run lint pass.
  • Tests: triage-contracts adds extends: art_123 in a policy file being refused, with and without rules, in friendly wording; the workspace-policy export row and save test are deleted; the hub store test is rewritten (pin, unknown checks, archived, config, and a stored policy with extends reads as corrupt). On current main: bun --conditions=intx-src test packages/triage-contracts packages/triage-workflows apps/hub/src/github apps/web/src/lib 1056 pass, 0 fail (Postgres tests included); web DOM tests 8 pass, 0 fail.
  • No-model evals, before and after, identical: hidden-content 187/187; scan and risk tables unchanged.
  • git grep -n -i "workspace.policy\|workspace-policy\|sharedPolicy\|storedPolicyPack" outside vendor/ matches only the kept SharedPolicy and readSharedPolicy, which the repository-file path uses.

Closes CL-11467

@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

CL-11467

@TheGreatAxios
TheGreatAxios force-pushed the cl-11467-remove-stored-workspace-policies branch 2 times, most recently from 116ed99 to 44c5042 Compare October 25, 2026 19:24
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 25, 2026 19:24
@corbits-triage

corbits-triage Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Unsure

Asking a maintainer about:

  • pull request is over the files limit: 38 files (max 30)

Notes:

  • Risk: medium (38 files, 9 recently fixed files)

Changed since the last verdict (Fail at 88488ec): 109 new commits.

@corbits-triage corbits-triage 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.

Triage requests changes:

  • CI green: required checks are failing
  • Merge conflicts: merge conflicts with base

@TheGreatAxios
TheGreatAxios force-pushed the cl-11467-remove-stored-workspace-policies branch from 88488ec to 0e6ba2a Compare October 27, 2026 04:08
@TheGreatAxios
TheGreatAxios marked this pull request as draft October 27, 2026 04:08
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 27, 2026 04:18
@corbits-triage
corbits-triage Bot dismissed their stale review October 27, 2026 04:40

Nothing triage asked to change still fails, so this request no longer stands.

A policy's extends now names only a repository; a stored repository policy that extends anything reads as corrupt.
@TheGreatAxios
TheGreatAxios force-pushed the cl-11467-remove-stored-workspace-policies branch from 0e6ba2a to e1eebae Compare October 27, 2026 04:47
@TheGreatAxios
TheGreatAxios merged commit c7f6531 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant