Skip to content

fix: repair main after the managed-allocation move landed under stale PRs - #2328

Merged
thymikee merged 1 commit into
mainfrom
fix/main-managed-allocation-move-merge
Sep 6, 2026
Merged

fix: repair main after the managed-allocation move landed under stale PRs#2328
thymikee merged 1 commit into
mainfrom
fix/main-managed-allocation-move-merge

Conversation

@thymikee

@thymikee thymikee commented Sep 6, 2026

Copy link
Copy Markdown
Member

main is red, and has been since #2308. Every open PR fails Typecheck, Repo Guards, and Integration Tests because of it — this unblocks them.

What broke

#2316 moved managed-device allocation into @agent-device/managed-allocation. #2308 was authored before that move and merged after it, so the daemon files it added still import pre-move sibling paths:

src/daemon/managed-device-allocation/lease-admission.ts(19,8): error TS2307:
  Cannot find module './record-validation.ts'
src/daemon/managed-device-allocation/lease-admission.ts(70,5): error TS2322:
  Type 'string | undefined' is not assignable to type 'string'
src/daemon/managed-device-allocation/__tests__/lease-admission.fixtures.ts(10,61): error TS2307:
  Cannot find module './fixtures.ts'
test/integration/provider-scenarios/managed-runtime-automation.fixtures.ts(17,8): error TS2307:
  Cannot find module '.../managed-device-allocation/__tests__/fixtures.ts'

A semantic conflict, so neither PR's own CI could have caught it.

Repairs

  • lease-admission.ts reaches freezeLease / isValidLease / isRequestGeneration / isVerbatimId through the package's ./record surface, which now re-exports them. record-validation.ts stays package-internal.
  • TS2322 needed no separate fix. It was a consequence of the unresolved import: with the module resolved, isVerbatimId narrows grant.identityIncarnationId to string again.
  • src/daemon/managed-device-allocation/__tests__/fixtures.ts comes back, stated in contract terms only. Both trees keeping their own test data is the shape refactor(daemon): move managed device allocation into its own workspace package #2316 already chose for managed-device-allocator.fixtures.ts, which exists identically at both the root and package.
  • .fallowrc.json drops its @agent-device/managed-allocation ignoreDependencies entry. Its comment read "no root consumer yet … it lands after the package's move" — the root consumer has now landed.

Also failing on main, independently

scripts/__tests__/eager-closure-budgets.test.ts > no APPROVED_OVER_CEILING row is stale fails on pristine origin/main. The merge-base now carries packages/capture-kit/src/durable-capture/index.ts (added with #2320), so nothing can read its approval row, and the table's own staleness rule fails it — the intended outcome, just never actioned. Row removed.

Validation

Verified failing on pristine origin/main first (typecheck and the closure gate, in a clean worktree), then green here:

  • pnpm typecheck — clean
  • pnpm test:unit — 1207 files, 9057 passed
  • managed-request-admission + managed-runtime-automation provider suites — 19 passed
  • pnpm lint, pnpm format:check, pnpm check:layering, pnpm check:fallow, pnpm check:freerange — all green

… PRs

`main` has been red since #2308. That PR was authored before #2316 moved
managed-device allocation into `@agent-device/managed-allocation`, so the daemon
files it added still import pre-move sibling paths that no longer exist:

    src/daemon/managed-device-allocation/lease-admission.ts(19,8): error TS2307:
      Cannot find module './record-validation.ts'
    src/daemon/managed-device-allocation/__tests__/lease-admission.fixtures.ts(10,61):
      error TS2307: Cannot find module './fixtures.ts'

Typecheck, Repo Guards, and the two managed provider-integration suites all fail
on it, which makes every open PR red.

- `lease-admission.ts` now reaches the record validators through the package's
  `./record` surface, which re-exports them. The `TS2322` at line 70 was a
  consequence of the unresolved import, not a separate defect: with the module
  resolved, `isVerbatimId` narrows `identityIncarnationId` again.
- The daemon-side grant fixtures come back under `src/daemon`, stated in
  contract terms only. Both trees keeping their own test data is the shape #2316
  already chose for `managed-device-allocator.fixtures.ts`.
- The root now consumes `@agent-device/managed-allocation`, so its
  `ignoreDependencies` entry — whose comment said "no root consumer yet" — goes.

Separately, the eager-closure ratchet was failing on a stale approval row: the
merge-base now carries `packages/capture-kit/src/durable-capture/index.ts`, so
nothing can read its `APPROVED_OVER_CEILING` row and the table's own staleness
rule fails it. Removed, exactly as the rule prescribes.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.49 MB 4.49 MB 0 B
Package (unpacked) 4.49 MB 4.49 MB 0 B
Package (download) 1.33 MB 1.33 MB +4 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 23.6 ms 23.8 ms +0.2 ms
CLI --help 67.0 ms 65.4 ms -1.6 ms

@thymikee

thymikee commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Looks good at 1e65590. The import repair uses the public package surface, the restored fixtures stay test-only, and the obsolete gate exception is removed. All checks are green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 6, 2026
@thymikee
thymikee merged commit 7bea29d into main Sep 6, 2026
18 checks passed
@thymikee
thymikee deleted the fix/main-managed-allocation-move-merge branch September 6, 2026 07:51
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-06 07:52 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.

1 participant