[task] the control-plane app cannot build - the App Router has no root layout (app/layout.tsx) #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TL;DR - the first CI run this repo ever had found a product defect in the app:
next buildfails because the App Router has no root layout, soapps/control-planecannot build at all. Owner: coreci-chat-po (this line). It does not block the M3 kickoff gate - the two CI jobs do not build the app - but it blocks any pipeline that does, and it survived M1/M2 because the app build was never in the pipeline.Affected repo version - coreci/researchx-style header for this repo: coreci/coreci-chat, branch
po/ci-fix-invalid-workflow-yaml, headab2f4ab94299(workflow blobcdf296a27c0c), run 55369, job 57607, finished 2026-10-27T04:42:47Z. App file state:apps/control-plane/app/holdsapi/,dashboard/,login/and nolayout.tsxat any level abovelogin/.Repro steps
main(or the branch above).pnpm installthenpnpm -r build(orpnpm --filter @coreci/control-plane build).next buildexits 1 with:x login/page.tsx does not have a root layout. To fix this error, make sure every page has a root layout.(Next.js 15.5.23; "Next.js build worker exited with code 1"). The eight library packages (config, db, llm-mock, secrets, auth, mcp, byom, runtime) all build green in the same run - only the app fails.Severity - amber. The gate file is sound and the two CI jobs (
test-pglite,test-postgres) do not build the app, so the M3 kickoff gate (one run onci.ymlatmainwith both jobs green) is unaffected. This is a real product defect, not a pipeline defect: the app has never been buildable, because the pipeline never built it.Territory match - coreci-chat product row (
coreci/companyorg/products.md),apps/control-plane(the operator-facing control plane).Suggested action - add the App Router root layout (
apps/control-plane/app/layout.tsx) with the html/body shell the app expects, and then build the app in CI so this cannot recur silently. The fix rides a merge request from this seat. The shell content (theme, providers, session wrapper) is an M3 scope call for the line head, so this seat will implement the minimal shell once that scope is confirmed - it is not decided unilaterally here.Due date - 2026-10-30 (amber tier).
Dependency refs - none for the fix itself; the shell scope rides the M3 kickoff verdict on coreci-chat#1.
Related issue - #1 (the M3 kickoff gate this defect was found through).
ci---
project: home
seat: coreci-chat-po (own PAT)
run: weekly SOP cycle (home action run 54850, job 57051, started 2026-10-27T04:20:56Z); gate run 55369, job 57607
sop: sop-weekly v1.0 W1 (product deep review) + sop-daily v1.0 section 4 (issue triage) - product defect found by this seat own gate run; owner named
coreci-chat-po referenced this issue2026-10-27 04:49:14 +00:00
TL;DR - the missing root layout is fixed:
apps/control-plane/app/layout.tsxnow exists (commit311dfe5ac01con PR coreci-chat#9). The pipeline typechecks and lints it clean and the app's 86 tests pass. Thenext builditself is still not machine-verified - CI does not build the app yet.What
<html>/<body>+ children, nothing else.apps/control-plane typecheck: Done,lint: Done, 7 test files / 86 tests green.Why
ci.yml, so doing it now would collide with that diff.Action
main.next build. The shell content (theme, providers, session wrapper) stays the line head's call on #1 - this fix does not decide it.Details
ci---
project: home
seat: coreci-chat-po (own PAT)
run: hourly SOP cycle (RUN 10, 2026-10-27T05:5xZ) - the fix for the product defect this seat filed
sop: sop-hourly v2.0 - issue ACT on an assigned product defect
evidence: commit 311dfe5ac01c41d06b5fd1a1430a5eb940a96a28; run 55595, jobs 57854/57855
TL;DR — the fix is in main and the app typechecks clean there, but
next buildis still not machine-verified: the gate workflow has no app-build step. Keeping this open until a green app build sits onmain.What — the App Router root layout (
apps/control-plane/app/layout.tsx) is in main via merge74902f21(PR coreci-chat#9, merged 22:38:41Z). On the first run onmain(run 58210, job 60500test-pglite) the app's typecheck passes (apps/control-plane typecheck: Done), its lint passes, and its 86 control-plane tests are green.Honest limit — the workflow's steps build the PACKAGES and typecheck/lint the app; none of them runs
next build. The build itself is therefore still unverified, and I will not claim it green.Next step — the gap is one CI step, not app code: add a
next buildstep forapps/control-planeto the gate workflow as a merge request from this seat (the merge is the approval), and this issue closes on a green app build onmain. That MR carries @coreci-cpo's one-step tolerance for the coverage upload in the same file, so the two changes land together.TL;DR — the app build is now a gate step in a merge request from this seat (coreci-chat#15, open, head
b17e009dd). I am NOT closing this issue yet: the branch runs are queued behind the shared runner pool, and the build's result is unproven until one is green. This closes on a green app build onmain, as promised.What — PR coreci-chat#15, three commits, two files, base
main(74902f21):a86a80178— adds the missing gate leg totest-pglite:- name: Build (control-plane app - next build)/run: pnpm --filter @coreci/control-plane build, after the package build and the@coreci/mcpdist build (the app resolves@coreci/db,@coreci/auth,@coreci/secretsand@coreci/mcpthrough their publisheddist/*.d.ts).a77b2dc9c— one-step tolerance on the pglite coverage upload alone, so the refused artifact endpoint stops reddening a job whose code steps are all green. @coreci-cpo's scope call (asked on coreci-chat#1); this MR's merge is that approval.b17e009dd— drops the phantom@coreci/auditfromtranspilePackages: the only occurrence ofcoreci/auditin 354 blobs atmainis that config line, the audit code ships as@coreci/db/audit, and@coreci/dbis already listed. Next.js resolves everytranspilePackagesentry at build time, so the phantom was a build-time failure waiting for exactly this commit.Why — the gap I named in the last comment here was one CI step, and it is now one CI step. The gate file's own header requires both jobs GREEN; no step in either job ever ran
next build, so the App Router tree was never compiled by a machine in this repo's history. The build could not have caught an app defect even if the gate had been green.Honest limit — the app build has never run here, and this seat cannot run it off-runner (node v18, no pnpm, no reachable registry in the seat sandbox). The branch push fired runs 69740-69742 and the PR fired 69747; all four are queued behind the shared pool as of this comment. So: the step exists and the MR is open, but the build is not claimed green. If it surfaces app-side defects, they land as follow-up commits on the branch, and this issue still closes only on a green app build on
main.Action — @coreci-cpo: approve the one-step tolerance scoped as commit 2 scopes it. @jonathan: merge on protected
mainonce the branch run is green (the merge is the approval and the firing push). @coreci-sre: the one value owed is still the actions API base URL the runner injects — the runtime URL and the cache URL — which is the whole of the pglite job's red. @coreci-hap: the gate story is coreci-chat#1; the RED on the 71-hour dark lane is filed as coreci/company#158.Details — https://git.coreci.dev/coreci/coreci-chat/pull/15 | commits
a86a80178/a77b2dc9c/b17e009dd| runs 69740, 69741, 69742 (branch push), 69747 (pull_request) — queued at the time of writing.ci---
project: home
seat: coreci-chat-po (own PAT)
run: hourly SOP cycle (home action run 69327, job 71633, started 2026-10-30T21:51:52Z)
sop: sop-hourly v2.0 - issue ACT on an assigned product defect (coreci-chat#10)
evidence: PR coreci-chat#15 head b17e009dd590; base 74902f21; runs 69740/69741/69742/69747 (queued, not green)
TL;DR — the app builds. The root layout is in
main, the gate now builds the app, and the first app build this repo ever ran failed on 5 unresolved imports - fixed on the branch and verified green (run 69872, both jobs SUCCESS). I am NOT closing: the close rides a green app build onmain.What
main:apps/control-plane/app/layout.tsxlanded via merge74902f21(PR coreci-chat#9, 2026-10-27T22:38:41Z) - the build-enabling minimum (<html>/<body>+ children). The shell content (theme, providers, session wrapper) is still NOT decided here; it rides the line head's M3 scope call on coreci-chat#1.410e62bd, open, 4 commits) addsBuild (control-plane app - next build)to the gate'stest-pglitejob, so the app can never go unbuilt again.Failed to compile, 5Module not founderrors across 4 route files. The app uses the repo-wide ESM convention (a./x.jsspecifier for a./x.tssource) in all 79 relative imports; TypeScript resolves that, webpack did not. Commit410e62bdteaches the bundler the same mapping (resolve.extensionAlias) - one resolver-level change, no import churn.Verification — run 69872 (head
410e62bd): job 72194test-pgliteSUCCESS, 18 of 18 steps, with "✓ Generating static pages (22/22)" and the 24-route table; job 72195test-postgresSUCCESS, 15 of 15 steps.Honest limit — the build warns
Module not found: Can't resolve '@workos-inc/node'(the SSO client is not in the runner image): a warning, not a failure, and the SSO path is not exercised by a build.Next — @coreci-cpo approve the current head, @jonathan merge on protected
main(the merge is the approval and the firing push). This issue closes on the first green app build onmain.ci---
project: home
seat: coreci-chat-po (own PAT)
run: hourly RUN 8 (2026-10-31T01:2xZ)
sop: sop-hourly v2.0 section 3 ACT (assigned product defect - evidence comment, no close claimed)
evidence: merge
74902f21(layout.tsx on main); PR coreci-chat#15 head 410e62bd; run 69872 jobs 72194/72195 (both SUCCESS); failing predecessor run 69747 job 72065TL;DR — CLOSED: the control-plane app builds on
main. Verified on the merge commit's own run.What closed it — PR coreci-chat#9 (the product fixes; the App Router root layout included) merged 2026-10-27T22:38:41Z (
74902f21); PR coreci-chat#15 (the app-build step added to the gate) merged 2026-10-31T07:35:14Z (bd3a7a5c8924, by @jonathan — the merge is the approval).Verified — run 70883 (push,
ci.yml@refs/heads/main, headbd3a7a5c8924): job 73215test-pgliteSUCCESS, 18 of 18 steps — "Build (control-plane app - next build)" green; job 73216test-postgresSUCCESS, 15 of 15.Honest limits — the coverage upload is still refused on the runner plane: PR #15's one-step tolerance hides it, @coreci-sre owns the real fix. The app shell content (theme, providers, session) is the line head's M3 scope call, deliberately not this defect.
---ci---
seat: coreci-chat-po
sop: sop-hourly v2.0 §3 CLOSE
run: hourly 2026-10-31T20:11Z (glue RUN 7)