fix: align layering claims, remove app-log ineffective dynamic import, refresh architecture records (#1222)#1227
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:
|
| GLOBALLY, across every production source file, it enforces the R1-R3 move rules | ||
| (kernel-sink, commands-floor, platforms-seam) and rejects all production static value-import | ||
| cycles. Separately, it ranks an explicit target spine — | ||
| `kernel ◄ platforms ◄ core ◄ commands ◄ { cli, client, daemon-server } ◄ daemon-client` — and |
There was a problem hiding this comment.
P2 (doc-accuracy nit, non-blocking). This compressed spine chain misplaces cli. Reading ◄ as "imported by" (kernel = sink, per the header), the trailing { cli, client, daemon-server } ◄ daemon-client asserts daemon-client imports every member of that group — including cli. But per TARGET_DAG_RANK, cli is rank 6 (the spine top) and daemon-client is rank 5, so daemon-client → cli is exactly a rank 5 → 6 back-edge the gate rejects. cli is the highest zone; nothing in the spine imports it.
check.ts avoids this by keeping client ◄ daemon/client on its own line and never chaining cli above daemon-client. Only this single CONTEXT.md chain introduces the inversion. Suggest moving cli to the far-right (top), e.g. … ◄ { client, daemon-server } ◄ daemon-client ◄ cli, or dropping cli from the compressed chain. model.ts ranks are authoritative and correct — this is purely the prose sketch, so it's a nit, but it's in the one doc whose stated purpose is describing the enforced order.
There was a problem hiding this comment.
Fixed in 5809c2b. The compressed CONTEXT chain now reads kernel ◄ platforms ◄ core ◄ commands ◄ { client, daemon-server } ◄ daemon-client ◄ cli, so cli (rank 6) sits at the far-right top and nothing in the spine imports it — no more implied daemon-client → cli back-edge. For coherence I also collapsed the check.ts header sketch onto that same single ordered line and added an explicit `A ◄ B` = B imports A legend so the direction is unambiguous. model.ts ranks were already authoritative/correct; this was prose-only.
Also in this commit (per the review's two coherence cleanups): ADR 0009 no longer contradicts itself on deferred scope — the closing line now says "within this consolidation the public Platform collapse is the last deferred step (net-new visionOS spatial-input QA is separate follow-up, outside the consolidation)"; and the app-log-request-scope.ts comment is trimmed to a 2-line module rationale, with the detailed bundler history kept in the PR description.
Re-ran on Node 22.18: format:check, check:layering (799 files, guard green), build (0 INEFFECTIVE_DYNAMIC_IMPORT), and check:affected --base origin/main --run all pass; only skillgym fails locally (spawn claude ENOENT, environmental — passes in CI).
Adversarial review — no P1 blockers; 1 P2 doc nit (inline on
|
| INEFFECTIVE warnings | internal/daemon.js |
|
|---|---|---|
main (ae2106792) |
1 (app-log.ts dyn-imported by request-platform-providers, statically by session-observability/session-teardown) |
356.16 kB |
| PR branch | 0 | 355.93 kB |
- The shim is an effective split:
dist/src/app-log-request-scope.js= 0.07 kB, dynamically imported and statically imported by nobody.app-log.tsnow has no dynamic importer, so the warning is structurally gone. - Cold-start / chunk graph preserved.
daemon.js356.16 → 355.93 kB (matches the −224 B size report).withAppLogProviderstays eager indaemon.js(re-export), so provider/request-scope behavior is byte-identical. - Justification for the shim over a static import reproduced. Patching
request-platform-providersto statically importwithAppLogProviderand rebuilding:daemon.js355.93 → 441.75 kB (~86 kB Apple-runner stack pulled eager) and 2 warnings — confirming the "naive static import is a cold-start regression" claim. - No misleading boundary / no cycle. Shim →
app-log.tsonly;app-log.tsdoes not import the shim; R4 (global cycle rejection) passes. The comment honestly states app-log stays eager.
Architecture records (verified against current main)
- ADR 0009 shipped:
src/platforms/apple/os/tvos/exists;APPLE_OS_CAPABILITIESinsrc/platforms/apple/capabilities.ts(parity testapple-os-capability-table-parity.test.tspasses, 4/4); watchOS sentinel present (all-false, reserved inAppleOS, never produced by discovery). Deferred is honest:PUBLIC_PLATFORMS = ['ios','macos',…]— the publicios/macos→applecollapse has not shipped.#972is closed. - ADR 0012 shipped: steps 1–6 map to
#1193/#1197/#1196/#1209/#1211, all merged intomain(confirmed viagit log).#1221and#1183are closed.#1209'sselector-miss/identity-mismatch/identity-unverifiablekinds + target guard exist insrc/replay/andsrc/daemon/handlers/session-replay-target-*. Step 7 deferred.
Tests run locally (Node 24)
pnpm check:layering— PASS (8 model tests + guard over 799 files).- Focused:
request-platform-providers(6),providers-plugin-routing-parity(3),app-log(14),apple-os-capability-table-parity(4),test:output-economy(26) — all PASS. pnpm build— PASS, 0 warnings.- CI: 19/19 green.
Verdict: no blockers. Only the inline CONTEXT.md:100 P2 doc-ordering nit is worth addressing (optional).
f8e9180 to
a58fb5a
Compare
|
Re-review at a58fb5a: the prior ADR 0012 honesty finding is not fixed. The status and migration table now say steps 1 through 6 shipped, but the Context still states in present tense that update healing is active, that no target-binding verification exists, and that update rewrites ad files. Current code and the same ADR migration table contradict those claims. Mark the Context as historical or update those present-tense descriptions before restoring ready-for-human. Runtime layering and app-log changes otherwise reviewed cleanly. No fixer dispatched. |
|
Fixed at |
|
Coordinator re-review at
Please rebase onto current One non-blocking wording correction should land with that update: #1214 overlaps the app-log portion but is an alternative implementation, not a prerequisite: it makes all provider wrappers static, while this PR retains the existing dynamic provider boundaries and changes only app-log through
|
…, refresh architecture records (#1222) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…wording, terse app-log-request-scope comment (#1222) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…edge order vs literal imports (#1222) 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>
a2a6984 to
03acf29
Compare
|
Addressed coordinator re-review |
|
Coordinator re-review at |
|
Summary
Aligns architecture enforcement and records with the repository’s actual scope and shipped state.
TARGET_DAG_RANK.app-log-request-scope.ts, removing the specific ineffective-dynamic-import warning without claiming app-log is lazy:app-log.tsremains eager through observability and teardown.#1228), and keeps benchmark step 7 deferred.Validation: format, typecheck, lint, layering, Fallow, build, unit/coverage, provider integration, and
git diff --checkpass. Localcheck:affected --runcompletes all runnable deterministic gates but cannot start SkillGym because this environment lacks theclaudeexecutable.Link to Devin session: https://app.devin.ai/sessions/b1c3093bf2b248ca82a1a5df89152d02
Requested by: @thymikee