fix: repair main after the managed-allocation move landed under stale PRs - #2328
Merged
Conversation
… 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.
Size Report
Startup median (7 runs, lower is better):
|
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. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainis 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:A semantic conflict, so neither PR's own CI could have caught it.
Repairs
lease-admission.tsreachesfreezeLease/isValidLease/isRequestGeneration/isVerbatimIdthrough the package's./recordsurface, which now re-exports them.record-validation.tsstays package-internal.TS2322needed no separate fix. It was a consequence of the unresolved import: with the module resolved,isVerbatimIdnarrowsgrant.identityIncarnationIdtostringagain.src/daemon/managed-device-allocation/__tests__/fixtures.tscomes 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 formanaged-device-allocator.fixtures.ts, which exists identically at both the root and package..fallowrc.jsondrops its@agent-device/managed-allocationignoreDependenciesentry. 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 stalefails on pristineorigin/main. The merge-base now carriespackages/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/mainfirst (typecheck and the closure gate, in a clean worktree), then green here:pnpm typecheck— cleanpnpm test:unit— 1207 files, 9057 passedmanaged-request-admission+managed-runtime-automationprovider suites — 19 passedpnpm lint,pnpm format:check,pnpm check:layering,pnpm check:fallow,pnpm check:freerange— all green