Skip to content

Port enforce policy, enforce-misses and telemetry consent into the CLI - #44

Merged
adityankale190895 merged 1 commit into
mainfrom
cli/port-enforce
Oct 26, 2026
Merged

adityankale190895 merged 1 commit into
mainfrom
cli/port-enforce

Conversation

@adityankale190895

Copy link
Copy Markdown
Member

Why

After the CLI moved to Core on 2026-10-18, work on it kept landing in DiffCI.com's private src/client. So the published @diffci.com/diffci was missing:

  • --policy enforce (DiffCI/DiffCI.com#69)
  • diffci enforce-misses (DiffCI/DiffCI.com#71)
  • consented telemetry controls (DiffCI.com 3ff9e44, Oct 14)

This brings them into packages/diffci-cli so Core is the only place the CLI is developed.

How

Three-way merge from the common base, DiffCI.com b35f55c (identical to the archived 0.3.10 source Core first imported), onto Core's CLI:

  • New: enforce-policy.ts, enforce-misses.ts, enforce-misses-collect.ts, telemetry.ts
  • Clean merges: context.ts, observe.ts, mcp.ts, usage-signal.ts
  • Resolved by hand:
    • verify.ts: enforce mode runs on top of Core's batched selection; fullSelection now returns the same shape as executableSelection. The report keeps both failure_baseline and enforcement.
    • cli.ts: the usage line keeps --baseline-on-failure alongside --policy enforce, --share-usage, --no-send, and adds the telemetry and enforce-misses commands.
  • The CLI package gets its own test runner (tsx, same as Core's root) and the matching tests.
  • release-files.json lists the new files.

Server-side parts of the telemetry change (product and site workers) stay private in DiffCI.com.

Testing

  • Core root: typecheck, 479/479 tests, audit:boundary (198 reviewed files)
  • CLI package: typecheck, 48/48 tests, build, package:check, package:smoke
  • Ran 19 more DiffCI.com client test files against the merged code (not added): 86/88 tests pass. The 2 failing groups read files that only exist at DiffCI.com's root, or expect the old upload-artifact@v4 tag that Core replaced with commit SHA pins in b7bd7af.

Follow-up

Point DiffCI.com's dogfood workflows and type imports at the published CLI, then remove its src/client copy.

🤖 Generated with Claude Code

…from DiffCI.com

Development of these features continued in DiffCI.com's private src/client
after the CLI moved to Core on 2026-10-18, so the published CLI lacked them.
Three-way merged from the common base (DiffCI.com b35f55c, the archived
0.3.10 source) onto Core's CLI:

- add enforce-policy, enforce-misses, enforce-misses-collect and telemetry
- verify: run --policy enforce on top of batched selection; fullSelection
  now returns the same shape as executableSelection
- cli: keep --baseline-on-failure alongside --policy enforce, --share-usage,
  --no-send, and the telemetry and enforce-misses commands
- give the CLI package its own tsx test runner and port the matching tests
- list the new files in the reviewed release boundary

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adityankale190895
adityankale190895 merged commit cbd5867 into main Oct 26, 2026
14 checks passed
@adityankale190895
adityankale190895 deleted the cli/port-enforce branch October 26, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant