Files
PaperClipAI/doc
DottaandPaperclip 56957f2bd9 fix(ci): isolate test selection and require current CI CODEOWNERS (#18376)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - PR CI selects affected suites and test files to reduce feedback
time.
> - A selected test inherited the parent selection when it launched an
independent runner fixture.
> - Ordinary source filenames containing config or setup also forced
broad coverage.
> - AWS runner access must depend on current CI CODEOWNERS, not only a
stored numeric roster.
> - This pull request fixes both selection problems and verifies owners
before AWS allocation.
> - Contributors retain GitHub-hosted CI. Authorized maintainers retain
AWS test and final verification jobs.

## Linked Issues or Issue Description

Refs #18362 and #18348.

The selected server run for #18369 failed in
`vitest-chat-shards.test.ts` because its temporary fixture inherited
`PAPERCLIP_CI_TEST_SELECTION` and attempted `git rev-parse HEAD` outside
a Git repository. #18366 could not use graph selection because
`session-config-metadata.test.ts` matched the broad filename rule.

The AWS setting was already enabled. The reviewed outsider PRs correctly
used hosted runners; a maintainer PR used AWS, including final
verification. This change strengthens that boundary rather than enabling
AWS for outsiders.

## What Changed

- Remove selection settings from Vitest child environments after the
wrapper validates the selected shard.
- Match conventional Vite/Vitest configuration filenames rather than any
occurrence of config or setup. Keep graph tracking for actual setup and
configuration dependencies.
- Bind rerun actor lookup to the exact run attempt. Require the author,
event sender and rerun actor to be current CI CODEOWNERS and members of
the existing numeric allowlist. Read the resolver and CODEOWNERS from
one protected master revision.
- Run metadata authorization on GitHub-hosted capacity before any AWS
allocation. Keep authorized test and final verification placement on the
AWS fleet.
- Add a real selected-server regression that launches nested chat
fixtures, negative authorization cases, and qualification for a real
config-named test.
- Update the developer and profiling guides.
- Retire eight legacy PR workflow SHA authorizations and one deleted
qualification-branch reference from the live `paperclip-public-pr`
runner group. The remaining three references are the trusted PR workflow
and the existing full-stack/protocol evaluation workflows on master. No
active PR run referenced the retired versions.

## Verification

- Selection regression tests: 13 passed, including the real nested chat
runner.
- Routing, planner and profiling tests: 100 passed, including 69 routing
cases.
- `actionlint` passed for both changed workflows. `git diff --check`
passed.
- Confirmed protected master still requires CODEOWNER review. A live
lookup found four CI owners, with three of six numeric roster entries
eligible and three denied by the new owner check.
- `pnpm -r typecheck` and `pnpm build` passed. The full local Vitest
suite was stopped after repeated embedded PostgreSQL initialization
failures; it did not pass. On final revision
`0b40ae15b7996603e405edd4157a5c337e0405c7`, both Linux qualification
jobs and all required CI gates passed. The main PR workflow completed
with 48 successful jobs and one intentional skip, including final
verification. [CI
run](https://github.com/paperclipai/paperclip/actions/runs/41126881716).
Greptile reviewed the final revision at 5/5 with no inline findings.
- Shard and workflow contracts: 44 passed. CI first caught an outdated
assertion that required the routing job to use AWS; it now requires
hosted authorization, and the policy job passes.
- A read-only live gate exercise preserved the existing merge-freshness
denial when master advanced beyond the available merge ref. It allocated
no runner and was not a successful admission proof.

## Risks

- The short metadata authorization job now depends on GitHub-hosted
queue capacity. This prevents a stale roster from allocating AWS before
current CODEOWNERS are checked. Authorized test and final verification
jobs still use AWS.
- Identity/API failures fall back to hosted CI. No caller can override
the trusted owner list with PR contents.
- Configuration dependencies still require conservative graph handling.
Existing setup dependency, opaque I/O, stale manifest and wrong-lane
tests remain in place.
- The runner group is restricted to selected repositories and selected
workflows. Its workflow allowlist was verified and narrowed through the
GitHub settings UI. Legacy pinned callers must update to the current
trusted workflow before using AWS; active PR runs used master
references. The current PR workflow authorization and evaluation
workflow authorizations remain in place.

## Model Used

- OpenAI Codex, based on GPT-6. The exact serving variant and context
limit are not exposed in this session. Used reasoning, repository
inspection, code execution and GitHub tools.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass — targeted suites passed;
the full local suite hit the PostgreSQL startup limitation documented
above, and full Linux CI passed
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-10-30 16:10:40 -05:00
..
2026-02-16 14:25:00 -06:00