Skip to content

refactor(kernel): relocate non-foundational stragglers before packaging (#1490 W-pre) - #1491

Merged
thymikee merged 1 commit into
mainfrom
claude/agent-device-scope-review-bmrfyc
Jul 30, 2026
Merged

refactor(kernel): relocate non-foundational stragglers before packaging (#1490 W-pre)#1491
thymikee merged 1 commit into
mainfrom
claude/agent-device-scope-review-bmrfyc

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

W-pre of #1490: kernel's file set becomes its public API before it moves to packages/. Three files drifted into the layering sink because R1 pushes shared code down, not because they are foundational — each relocates to the zone its consumers earn:

  • audio-probe-support.tssrc/contracts/ — capability policy ("which devices support host audio probing"), consumed by the platform audio backend, the Apple plugin, interactor registration, and the Apple capability parity test. Contracts is the lowest rank shared by all consumers.
  • input-validation.tssrc/contracts/readOptionalInteger over AppError; its lowest-rank consumer is contracts/gesture-input.ts (plus commands and a daemon handler above).
  • observability-redaction.tssrc/commands/observability/runtime/ — colocated with its single consumer, diagnostics-format.ts.

Pure git mv + import rewrites; no behavior change, no re-exports left behind. Kernel retains exactly its package-ready vocabulary: errors, device, snapshot, contracts, collections, rect, redaction, daemon-error — all with zero internal imports (R1), ready for the W0 @agent-device/kernel pilot.

Validation

  • pnpm check:affected --run — all runnable checks passed: format, lint, typecheck (root + examples/sdk), layering (R1–R10 green, R6 at 7, R9 at 102), build, check:fallow (no issues in 11 changed files), vitest-related, and the full provider-integration project (41 files, 150 tests).
  • Targeted: unit-core over src/contracts + src/commands/observability (90 tests), affected-check selector suites (27/27).
  • No baseline files reference the moved paths (fallow/mutation/layering checked).
  • Runtime device verification does not apply: file moves and import-path rewrites only, byte-identical function bodies.

Part of #1490 (W-pre checkbox). Next up per the issue sequencing: W0 lands after #1489 (P1) merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FUv7bvbWNryuXgSBuqTtep


Generated by Claude Code

W-pre of #1490: kernel's file set becomes its public API before it
moves to packages/. Three files drifted into the sink because R1
pushes shared code down, not because they are foundational:

- audio-probe-support -> src/contracts/ (capability policy consumed by
  platform plugins and interactor registration)
- input-validation -> src/contracts/ (lowest-rank consumer is
  contracts/gesture-input)
- observability-redaction -> src/commands/observability/runtime/
  (colocated with its only consumer, diagnostics-format)

Pure moves; no behavior change. Kernel retains errors, device,
snapshot, contracts, collections, rect, redaction, daemon-error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUv7bvbWNryuXgSBuqTtep
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.88 MB 1.88 MB 0 B
JS gzip 604.0 kB 604.0 kB 0 B
npm tarball 722.5 kB 722.5 kB 0 B
npm unpacked 2.53 MB 2.53 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.8 ms 27.3 ms +0.5 ms
CLI --help 57.1 ms 57.0 ms -0.1 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed exact head 46e389f. This cleanly completes #1490 W-pre: the three kernel stragglers move to their lowest coherent owners, old paths are gone with no compatibility shims, and production changes are limited to import rewrites. No CLI/wire/runtime behavior changes; relevant coverage and all static, provider, platform, and packaged-CLI gates are green. No findings — ready for human review.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 29, 2026
@thymikee
thymikee merged commit f0d656d into main Jul 30, 2026
30 checks passed
@thymikee
thymikee deleted the claude/agent-device-scope-review-bmrfyc branch July 30, 2026 05:41
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-30 05:42 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants