Repository navigation
refactor(interaction): move the moving-target decision policy into the runtime gate - #3631
Conversation
…e runtime gate MovingTargetBaseline stays in contracts beside CommandSessionRecord; the window and sample-gap constants, the decision union, and movingTargetGateDecision move into the runtime gate, their only consumer. The decision tests move with them, unchanged.
…path The module is gone; remove its exports-map entry and its line in the contracts export snapshot.
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…rgets and any dispatch
#3623 put the entry on main, so the merge-base now carries it and the no-growth rule governs it; the stale-row check asks the next PR to remove it.
|
This looks good at ea0db16. The policy moves to its only consumer, the baseline type stays in contracts beside the session record field, and no importer of the removed subpath is left. All 22 checks pass, and there are no conflicts. I did not run the vitest or fallow gates locally; I relied on your pnpm check:affected run and on CI. Not blocking, take or leave both: Two earlier threads are fixed at this commit, so please resolve them: the header now limits the guarantee to selector and @ref targets (#3631 (comment)), and it says the gate dispatches the requested interaction instead of the tap (#3631 (comment)). |
|
Summary
Follow-up to #3538 (owner comment 6145734277). The moving-target baseline stays in contracts, and the policy moves to its only consumer.
MovingTargetBaselinenow sits inpackages/contracts/src/runtime-contract.ts, next toCommandSessionRecord.movingTargetBaseline. Daemon core (session-state.ts,deferred-interaction-outcome.ts) imports it from there, still as a type-only import.MOVING_TARGET_GATE_WINDOW_MS,MOVING_TARGET_GATE_SAMPLE_GAP_MS, theMovingTargetGateDecisionunion andmovingTargetGateDecisionmove intosrc/commands/interaction/runtime/moving-target-gate.ts. The gate is their only consumer; a grep ofpackages,srcandscriptsfound no other importer of a policy symbol.moving-target-gate.test.ts, the gate's mirror test file../moving-target-gatesubpath inpackages/contracts/package.json@agent-device/contracts/moving-target-gateinscripts/layering/contracts-exports.snapshot.jsonpackages/contracts/src/moving-target-gate{,.test}.tsNo behavior change. 10 files, +208/−241. No fallow baseline referenced the old path.
This PR also deletes the stale
replay-maestro-backend.tsAPPROVED_OVER_CEILINGrow. That deletion is the follow-up #3623 left for the next PR off main.Validation
pnpm check:affected --runatea0db1646passed. A package manifest changed, so it ran the full check set, including format, lint, typecheck, layering, fallow, build, package, integration-node, macos-coverage, vitest-related, production-exports and the compat suites. The eager-closure budgets do not grow.The earlier run at
e7701ae3ffailed only on the stale approval row, which this PR now deletes. A cold review found nothing, and both cubic findings (header wording) are fixed inb478e8a61.