Skip to content

[#552] feat: keep choice persisted in pair.config.json - #554

Merged
rucka merged 9 commits into
mainfrom
feature/US-552-keep-choice-persisted
Oct 17, 2026
Merged

rucka merged 9 commits into
mainfrom
feature/US-552-keep-choice-persisted

Conversation

@rucka

@rucka rucka commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

PR Information

PR Title: [#552] feat: keep choice persisted in pair.config.json
Story/Epic: #552 (second increment)
Type: Feature

Summary

What Changed

  • install --skip-registries persists skipRegistries in project pair.config.json (union, keys/order kept)
  • install/update honour it: skipping <name> (from pair.config.json|--skip-registries)
  • update --skip-registries (same parser, persisted)
  • Unparseable or non-object project config / non-string-array skipRegistries: exit 1 naming file, nothing written
  • Unknown config name: warn, ignored; unknown flag name: exit 1
  • /pair-assistant Step 0b/Step 5 text; CP3 MT-CP322/323, CP12 MT-CP1205, MT-CP806 step 6 fixed

Why This Change

O1: plain update after keep overwrote own AGENTS.md/CLAUDE.md.

Story Context

Acceptance Criteria: AC2-AC8 (AC1 delivered in #553). Source KB cannot set the key (layer 2 builds asset_registries only).

Changes Made

  • Loader: validated skipRegistries; projectConfigOnly throws on bad project config
  • commands/skip-registries.ts: shared apply + persist helper
  • Unit + darwin/linux tests; smoke Tests 7-8 in install-preconditions.sh
  • Changeset: minor

Testing

Unit (loader, handlers, platform), pnpm smoke-tests offline, skills:conformance, pre-push gate green.

🤖 Generated with Claude Code

T and others added 5 commits October 17, 2026 11:55
…honoured by install and update; update --skip-registries

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, update honours it, opt-in

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eset

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@rucka rucka self-assigned this Oct 17, 2026
@rucka rucka added the pr-state:to-be-reviewed PR state: awaiting review / gate label Oct 17, 2026
@rucka

rucka commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict

risk:yellow · cost:n/a — CHANGES-REQUESTED — keep choice holds on every probed path; one Minor: a non-object project pair.config.json is silently rewritten.

Open findings: 1.

PR: #554 · Story: US-552 · Type: feature

Assessments

Security

Verdict: green — source KB pair.config.json only contributes asset_registries (probed: skipRegistries in KB root/config.json ignored).

Boundary / AC evidence

Probed on the built CLI after pnpm install --frozen-lockfile && pnpm build (exit 0); pair-cli tests 3217 pass, lint and ts:check clean. Custody: no sealed contract, verified.

  • AC2 install(keep) merges skipRegistries, other keys kept: proven (skip-registries.test.ts AC2, CLI probe).
  • AC3 plain update, own files byte-identical, skipping agents (from pair.config.json): proven (test + smoke Test 7 + probe).
  • AC4 update --skip-registries persists; unknown flag exit 1 (nothing written); unknown config name warns: proven.
  • AC5 removing exclusion re-installs pair files: proven (test + smoke Test 8).
  • AC6 unparseable / non-string-list: exit 1, file untouched (probed install and update; loader.test.ts): proven.
  • Source KB cannot set key: probed, ignored.

Details

Minor

  • r0-1 apps/pair-cli/src/commands/skip-registries.ts:56 — project pair.config.json containing valid non-object JSON ([1] or "x") is accepted by the loader; install --skip-registries agents then exits 0 and rewrites it to {"0":1,"skipRegistries":["agents"]} (null correctly exits 1). Content lost, contradicts "merged without dropping other keys" and AC6 intent. Fix: loader rejects a non-object project config under pairConfigOnly, with a test. VERIFY: install with [1] config exits 1, file unchanged; ORACLE: printf '[1]' > pair.config.json; pair-cli install --skip-registries agents --source <kb> --offline; ASSERT: exit 1, bytes unchanged.

@rucka rucka added pr-state:not-approved PR state: changes requested risk:yellow Classification: medium risk tier and removed pr-state:to-be-reviewed PR state: awaiting review / gate labels Oct 17, 2026
T and others added 4 commits October 17, 2026 12:48
Pair-RED-Snapshot: pr=554; phase=r1-g1; base=c7448da0fdba0f856e7a22d830e64fe635e28da5; manifest=.pair/red-snapshots/pr-554-r1-g1.json
…update

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@rucka rucka added pr-state:to-be-reviewed PR state: awaiting review / gate pr-state:ready-to-merge PR state: gates green + review approved and removed pr-state:not-approved PR state: changes requested pr-state:to-be-reviewed PR state: awaiting review / gate labels Oct 17, 2026
@rucka

rucka commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Delivery workflow summary

1. Identity — pair-implement-batch 4.0.1 | run story-552 | models: not recorded (in-session) | reviewed head: c3fd361f10c3456adfb12edc8f107c1da4a2c487

2. Status — quality: converged · delivery: ready-for-merge · gate/custody: passed

3. Cycles — completed 1 / attempted 1 · review batches 2 · review executions 2 · retries 0 · redirects null · contract revisions 0 · preparation repairs 0 · invalidated remediations 0 · regression repairs 0 · active regression risks 0 · discharged regression risks 0 · admin/engine recoveries null

4. Cost / time — tokens not recorded (in-session: no host runtime supplied usage) · elapsed ≈ 36m (handoff timestamps, 6 handoffs; wall clock including waits)

5. Late defects (by origin) — preexisting-missed 0 · introduced-by-remediation 0 · unknown 0 · missedUpstream 0

Findings

id severity found status location summary resolution
r0-1 Minor r0 resolved apps/pair-cli/src/config/loader.ts:97 Non-object project pair.config.json now rejected under pairConfigOnly; verified on built CLI: [1] and "x" exi… printf [1] > pair.config.json; node dist/cli.js install|upd…

No scope proposals.

6. Machine-readable summary

{
  "schemaVersion": 1,
  "sourceDigest": "sha256:8a05c43fdfe3fe6faa7dec5d3443a39551fa4eebaadb5017c928f33c4a580c4a",
  "asOf": "2026-10-17T11:17:49.847Z",
  "metricsRevision": 1,
  "completeness": "partial",
  "missingSources": []
}

@rucka
rucka merged commit 88387c1 into main Oct 17, 2026
27 checks passed
@rucka
rucka deleted the feature/US-552-keep-choice-persisted branch October 17, 2026 11:46
rucka pushed a commit that referenced this pull request Oct 17, 2026
…ENTS.md/CLAUDE.md, choice persisted in pair.config.json (#553, #554)

- install --skip-registries <list>: skipped registries excluded from precheck and execution; unknown names rejected
- precheck refuses an existing copy target of a non-skipped registry (lone CLAUDE.md no longer overwritten silently)
- the keep choice is persisted as `skipRegistries` in the project pair.config.json (merged, other keys kept); update honours it, prints the skip, accepts --skip-registries (persisted); opt back in by removing the entry
- unparseable / non-object project pair.config.json or invalid skipRegistries → exit 1, nothing written; a source KB cannot set it
- /pair-assistant Step 0b/5: per-file keep/overwrite (mv backup), install refusal on any existing registry target, table of the 7 registry names, update behaviour
- smoke tests on a repo with own files (install-preconditions 4–8), CP3 MT-CP322/323, CP12 MT-CP1203/1204/1205, MT-CP806/308 fixes
- test: regenerate-mirrors early-interrupt case no longer busy-spins the CPU (setImmediate → 1ms poll) and budgets every run, fixing the CI timeout that failed the v0.5.0-pre.2 release gate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uFPtgh6WyrKFHVJYyRAdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-state:ready-to-merge PR state: gates green + review approved risk:yellow Classification: medium risk tier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant