Skip to content

refactor(policy): name saved rules by host - #608

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-11463-keep-rules-policy-files-and-stats-separate-for-same-named-s1
Oct 25, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-11463-keep-rules-policy-files-and-stats-separate-for-same-named-s1

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 of CL-11463

What changed

  • checkPackName(repo, source) takes the repository's host, which is now required. A GitHub repository's saved rules keep the title check-pack/<owner>/<name>, and a Bitbucket Data Center repository's become check-pack/bitbucket-datacenter/<owner>/<name>.
  • The trigger mail's policy.checkPack.name and the hub's saved-rules read now pass the record's host. The GitHub title fallback still passes "github" and keeps excluding ids that a same-named record on another host pins, because Bitbucket rules saved before this change keep the GitHub-style title and are read through their pin.
  • The portal doesn't know the host yet, so its callers (writeCheckPack, withPackPointers, saveRepoSettings, hasPack, fake hub) pass "github". That keeps today's behaviour; a later part passes the host.
  • No data migration. The artifact versions route (@corbits/artifacts 0.2.0, reviseArtifactVersion) applies a given title, so a legacy Bitbucket rule set is retitled the next time it is saved with its host.
  • Docs: ARCHITECTURE.md and the triage-contracts README say the trigger mail names the title for the repository's host, and that only a GitHub repository falls back to the newest artifact with its title. Describing the Bitbucket title waits for the part where the portal writes it.

Verification

  • bun run check and bun run lint pass.
  • After rebasing on main: triage-contracts 248 tests and the 7 touched hub test files (68 tests) pass. Before the rebase: triage-contracts: 247 → 248 tests (new: titles per host). apps/web: 229 and 7 DOM tests, unchanged. Hub, run alone with local Postgres: 429 tests, unchanged, all pass. server.test.ts's beforeAll timed out on two runs and passed 12/12 on the third.

@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

CL-11463

checkPackName takes the repository's host; a Bitbucket Data Center repository's saved rules are titled check-pack/bitbucket-datacenter/<owner>/<name>. Callers that don't know the host yet keep the GitHub title.
@TheGreatAxios
TheGreatAxios force-pushed the cl-11463-keep-rules-policy-files-and-stats-separate-for-same-named-s1 branch from b62c724 to 10a518e Compare October 25, 2026 20:00
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 25, 2026 20:26
@corbits-triage

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve.
Waiting on a maintainer to approve: request review.

@TheGreatAxios
TheGreatAxios merged commit d63aae3 into main Oct 25, 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