[task] the control-plane app cannot build - the App Router has no root layout (app/layout.tsx) #10

Closed
opened 2026-10-27 04:48:43 +00:00 by coreci-chat-po · 5 comments
Collaborator

TL;DR - the first CI run this repo ever had found a product defect in the app: next build fails because the App Router has no root layout, so apps/control-plane cannot 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, head ab2f4ab94299 (workflow blob cdf296a27c0c), run 55369, job 57607, finished 2026-10-27T04:42:47Z. App file state: apps/control-plane/app/ holds api/, dashboard/, login/ and no layout.tsx at any level above login/.

Repro steps

  1. Check out coreci/coreci-chat at main (or the branch above).
  2. pnpm install then pnpm -r build (or pnpm --filter @coreci/control-plane build).
  3. next build exits 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 on ci.yml at main with 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/company org/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

**TL;DR** - the first CI run this repo ever had found a product defect in the app: `next build` fails because the App Router has no root layout, so `apps/control-plane` cannot 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`, head `ab2f4ab94299` (workflow blob `cdf296a27c0c`), run 55369, job 57607, finished 2026-10-27T04:42:47Z. App file state: `apps/control-plane/app/` holds `api/`, `dashboard/`, `login/` and **no `layout.tsx`** at any level above `login/`. **Repro steps** 1. Check out coreci/coreci-chat at `main` (or the branch above). 2. `pnpm install` then `pnpm -r build` (or `pnpm --filter @coreci/control-plane build`). 3. `next build` exits 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 on `ci.yml` at `main` with 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/company` `org/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 added this to the v1 milestone 2026-10-27 04:48:43 +00:00
coreci-chat-po added the type:task label 2026-10-27 04:48:43 +00:00
coreci-chat-po self-assigned this 2026-10-27 04:48:43 +00:00
Author
Collaborator

TL;DR - the missing root layout is fixed: apps/control-plane/app/layout.tsx now exists (commit 311dfe5ac01c on PR coreci-chat#9). The pipeline typechecks and lints it clean and the app's 86 tests pass. The next build itself is still not machine-verified - CI does not build the app yet.

What

  • The new file is the build-enabling minimum: <html>/<body> + children, nothing else.
  • Run 55595, job 57854 (PGlite): apps/control-plane typecheck: Done, lint: Done, 7 test files / 86 tests green.
  • Run 55595, job 57855 (Postgres 16): packages green (packages/db 3 suites, pen test included); the app's 31 red assertions are unchanged - they are #12 and #13.

Why

  • Without a root layout Next.js cannot build the app, so no pipeline step could ever build it and nobody caught it.
  • The app-build CI step lands after the gate PR merges - both touch ci.yml, so doing it now would collide with that diff.

Action

  • @coreci-cpo: approve PR coreci-chat#9 against the current head (11 commits, five files). @jonathan: merge on protected main.
  • Then add the app build to CI and close this issue on a green 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 missing root layout is fixed: `apps/control-plane/app/layout.tsx` now exists (commit `311dfe5ac01c` on PR coreci-chat#9). The pipeline typechecks and lints it clean and the app's 86 tests pass. The `next build` itself is still not machine-verified - CI does not build the app yet. **What** - The new file is the build-enabling minimum: `<html>`/`<body>` + children, nothing else. - Run 55595, job 57854 (PGlite): `apps/control-plane typecheck: Done`, `lint: Done`, 7 test files / 86 tests green. - Run 55595, job 57855 (Postgres 16): packages green (packages/db 3 suites, pen test included); the app's 31 red assertions are unchanged - they are #12 and #13. **Why** - Without a root layout Next.js cannot build the app, so no pipeline step could ever build it and nobody caught it. - The app-build CI step lands after the gate PR merges - both touch `ci.yml`, so doing it now would collide with that diff. **Action** - @coreci-cpo: approve PR coreci-chat#9 against the current head (11 commits, five files). @jonathan: merge on protected `main`. - Then add the app build to CI and close this issue on a green `next build`. The shell content (theme, providers, session wrapper) stays the line head's call on #1 - this fix does not decide it. **Details** - https://git.coreci.dev/coreci/coreci-chat/pull/9 | run 55595, jobs 57854/57855 --- 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
Author
Collaborator

TL;DR — the fix is in main and the app typechecks clean there, but next build is still not machine-verified: the gate workflow has no app-build step. Keeping this open until a green app build sits on main.

What — the App Router root layout (apps/control-plane/app/layout.tsx) is in main via merge 74902f21 (PR coreci-chat#9, merged 22:38:41Z). On the first run on main (run 58210, job 60500 test-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 build step for apps/control-plane to the gate workflow as a merge request from this seat (the merge is the approval), and this issue closes on a green app build on main. 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 fix is in main and the app typechecks clean there, but `next build` is still not machine-verified: the gate workflow has no app-build step. Keeping this open until a green app build sits on `main`.** What — the App Router root layout (`apps/control-plane/app/layout.tsx`) is in main via merge `74902f21` (PR coreci-chat#9, merged 22:38:41Z). On the first run on `main` (run 58210, job 60500 `test-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 build` step for `apps/control-plane` to the gate workflow as a merge request from this seat (the merge is the approval), and this issue closes on a green app build on `main`. That MR carries @coreci-cpo's one-step tolerance for the coverage upload in the same file, so the two changes land together.
Author
Collaborator

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 on main, as promised.

What — PR coreci-chat#15, three commits, two files, base main (74902f21):

  1. a86a80178 — adds the missing gate leg to test-pglite: - name: Build (control-plane app - next build) / run: pnpm --filter @coreci/control-plane build, after the package build and the @coreci/mcp dist build (the app resolves @coreci/db, @coreci/auth, @coreci/secrets and @coreci/mcp through their published dist/*.d.ts).
  2. 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.
  3. b17e009dd — drops the phantom @coreci/audit from transpilePackages: the only occurrence of coreci/audit in 354 blobs at main is that config line, the audit code ships as @coreci/db/audit, and @coreci/db is already listed. Next.js resolves every transpilePackages entry 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 main once 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 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 on `main`, as promised.** What — PR coreci-chat#15, three commits, two files, base `main` (`74902f21`): 1. `a86a80178` — adds the missing gate leg to `test-pglite`: `- name: Build (control-plane app - next build)` / `run: pnpm --filter @coreci/control-plane build`, after the package build and the `@coreci/mcp` dist build (the app resolves `@coreci/db`, `@coreci/auth`, `@coreci/secrets` and `@coreci/mcp` through their published `dist/*.d.ts`). 2. `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. 3. `b17e009dd` — drops the phantom `@coreci/audit` from `transpilePackages`: the only occurrence of `coreci/audit` in 354 blobs at `main` is that config line, the audit code ships as `@coreci/db/audit`, and `@coreci/db` is already listed. Next.js resolves every `transpilePackages` entry 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 `main` once 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)
Author
Collaborator

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 on main.

What

  • The defect's first half is done on main: apps/control-plane/app/layout.tsx landed via merge 74902f21 (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.
  • The second half is in flight: PR coreci-chat#15 (head 410e62bd, open, 4 commits) adds Build (control-plane app - next build) to the gate's test-pglite job, so the app can never go unbuilt again.
  • The build then found the next layer, and it is fixed: run 69747, job 72065 - Failed to compile, 5 Module not found errors across 4 route files. The app uses the repo-wide ESM convention (a ./x.js specifier for a ./x.ts source) in all 79 relative imports; TypeScript resolves that, webpack did not. Commit 410e62bd teaches the bundler the same mapping (resolve.extensionAlias) - one resolver-level change, no import churn.

Verification — run 69872 (head 410e62bd): job 72194 test-pglite SUCCESS, 18 of 18 steps, with "✓ Generating static pages (22/22)" and the 24-route table; job 72195 test-postgres SUCCESS, 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 on main.


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 72065

**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 on `main`.** **What** - **The defect's first half is done on `main`:** `apps/control-plane/app/layout.tsx` landed via merge `74902f21` (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. - **The second half is in flight:** PR coreci-chat#15 (head `410e62bd`, open, 4 commits) adds `Build (control-plane app - next build)` to the gate's `test-pglite` job, so the app can never go unbuilt again. - **The build then found the next layer, and it is fixed:** run 69747, job 72065 - `Failed to compile`, 5 `Module not found` errors across 4 route files. The app uses the repo-wide ESM convention (a `./x.js` specifier for a `./x.ts` source) in all 79 relative imports; TypeScript resolves that, webpack did not. Commit `410e62bd` teaches the bundler the same mapping (`resolve.extensionAlias`) - one resolver-level change, no import churn. **Verification** — run 69872 (head `410e62bd`): job 72194 `test-pglite` SUCCESS, 18 of 18 steps, with "✓ Generating static pages (22/22)" and the 24-route table; job 72195 `test-postgres` SUCCESS, 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 **on `main`**. --- 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 72065
Author
Collaborator

TL;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, head bd3a7a5c8924): job 73215 test-pglite SUCCESS, 18 of 18 steps — "Build (control-plane app - next build)" green; job 73216 test-postgres SUCCESS, 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)

**TL;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`, head `bd3a7a5c8924`): job 73215 `test-pglite` **SUCCESS, 18 of 18 steps — "Build (control-plane app - next build)" green**; job 73216 `test-postgres` SUCCESS, 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)
Sign in to join this conversation.