chore: add agent-efficiency regression guards#1174
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
|
Review found three blockers before
Local validation: the layering model/check, output-economy project, and focused command-explain tests all pass. All 22 GitHub checks are green, but the current tests do not exercise the failure modes above. Please address all actionable points and reply with what changed, what was validated, and anything still blocked. |
|
Blocker 1 fixed in |
|
Blocker 2 fixed in |
|
Blocker 3 fixed in |
|
Follow-up architecture blocker from the fix pass: The owner-path correction now adds two new parallel registries: Please colocate command owner metadata with the command facet/descriptor and route owner metadata with the daemon route/handler declaration, then derive One smaller type-safety regression came with the alias extraction: The original three behavioral blockers now reproduce as fixed, and focused local validation passes. This follow-up is about preserving the registry architecture rather than replacing one drift source with another. |
|
Addressed the follow-up architecture blocker in |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…src files Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…cy-derived error, like-for-like screenshot surfaces Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…owners Surface true CLI aliases from parser normalization (long-press, metrics, tap, launch, relaunch) distinct from catalog keys, preserving implied-flag semantics (relaunch => open --relaunch). Extract the canonical single-line usage builder to src/utils/cli-usage.ts so schemas without usageOverride include positionals and flags. Replace guessed handler paths with a completeness-checked daemon-route owner map keyed by the closed DaemonCommandRoute union, fixing silently-dropped non-kebab routes (reactNative, recordTrace) and generic dispatch. Add table-driven coverage for aliases, synthesized usage, split-family/route-variant/dispatch owners, structured output, and explain:command CLI exit/stdout/stderr. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
cc5d456 to
7d2f681
Compare
|
One architecture blocker remains at Command owner metadata and alias implied-flag typing are now fixed. Daemon route ownership is still a parallel claim, though: Please colocate each route's owner metadata with the actual loader/dispatch declaration, or add a structural derivation that makes the handler used by The rest of the requested fixes reproduce as resolved, and all 22 checks pass. |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Addressed in |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Final re-review of The route-owner drift is now closed structurally: each production route declaration binds its owner path, exact loader, and dispatch adapter in The added output-budget ratchet also holds: CI fetches the target history, compares candidate bytes/lines against the target-base (or first introduced baseline), rejects baseline inflation and removed measured surfaces, and permits an increase only through an exact reviewed metric plus reason. The production MCP fixture measures optimized text and structured content together. All 22 checks pass. This is tooling/contract work; no device evidence is required. Issue #1178 correctly tracks the non-blocking follow-up to erase owner metadata from production bundles without recreating a registry. Ready for maintainer judgment. |
Summary
pnpm check:layering: R1–R3 share resolved import edges with a zero value-import-cycle guard and an exact-identity, down-only back-edge baseline. CI compares the committed baseline to the PR base, so removals pass while additions and same-count edge replacements fail.pnpm explain:command <name|catalogKey> [--json] [--full], derived from typed command, CLI, capability, timeout, and dispatch declarations.CommandDescriptor.ownerFilesis required;DAEMON_ROUTE_HANDLERSbinds each route's owner file, production loader, and dispatch adapter in one declaration without changing fallback bundling.--full/--json. CLI alias implied flags are restricted to booleankeyof CliFlagskeys.Validation
pnpm buildpnpm format:checkpnpm typecheckpnpm lintpnpm check:layeringnode --experimental-strip-types scripts/layering/check.ts --base origin/mainOUTPUT_ECONOMY_BASE=$(git merge-base HEAD origin/main) pnpm test:output-economypnpm test:unitpnpm check:fallow --base origin/mainLink to Devin session: https://app.devin.ai/sessions/b1c3093bf2b248ca82a1a5df89152d02
Requested by: @thymikee