You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cockpit): centralize port allocation behind cockpit/ports.mjs registry (#551)
* docs(spec): cockpit port registry design
* docs(plan): cockpit port registry implementation plan
* feat(ci): cockpit ports registry + verifier spec (skeleton)
Registry starts empty; the verifier spec tests both the registry
shape (positive int ports, no duplicates, range/convention checks)
and cross-file invariants (python --port + playwright baseURL match
registry). Empty registry intentionally fails the 'covers every
cap' test until Task 2 populates it.
Spec: docs/superpowers/specs/2026-05-27-cockpit-port-registry-design.md
* feat(ci): populate cockpit ports registry from on-disk values
31 entries, extracted from each cap's proxy.conf.json target +
playwright.config.ts baseURL (or langgraph - 1000 for non-e2e caps).
Verifier confirms the registry round-trips cleanly against every
python/project.json --port literal.
* test(ports): verifier skips python --port check for caps without literal
Only chat caps have --port in their python/project.json serve target;
langgraph/deep-agents/render caps rely on the e2e harness spawning
langgraph with explicit --port from global-setup-impl.ts. Skip
verifier check for those rather than fail.
* refactor(cockpit): 31 proxy.conf.json → proxy.conf.mjs (import ports registry)
Every cockpit cap's proxy.conf.json is replaced with proxy.conf.mjs
that imports portsFor(capName) from cockpit/ports.mjs and templates
the langgraph port into the target URL. Each angular/project.json's
serve.options.proxyConfig is updated to point at the .mjs file.
cockpit/ag-ui/streaming is excluded — non-LangGraph backend, kept
as proxy.conf.json with its /agent → :3000 literal.
* refactor(cockpit): 24 e2e configs import ports from registry
Each cap's e2e/global-setup-impl.ts now imports portsFor() and reads
angular/langgraph ports from the registry instead of literal numbers.
playwright.config.ts is updated similarly for baseURL.
All 24 e2e tsconfig.json files gain allowJs: true so tsc accepts the
.mjs import without a declaration file.
The verifier's playwright-baseURL check now skips templated configs
(its regex only matches literal URLs); drift is impossible because
the value imports directly from the registry.
* ci: gate cockpit-ports.spec.mjs in ci-scope test job
Appends the new verifier spec to the existing node --test invocation
so registry drift is caught at PR time.
* test(cockpit): wiring spec reads ports from registry; recognizes .mjs proxy
The drift-guard test previously parsed proxy.conf.json target + the
literal langgraphPort/angularPort lines in global-setup-impl.ts. Both
were removed by the port-registry migration:
- proxy.conf.json → proxy.conf.mjs (templates target from registry)
- global-setup-impl.ts now reads `ports.langgraph` / `ports.angular`
Updated wiring spec:
- Imports `portsFor` from cockpit/ports.mjs to look up expected ports
by project name. Falls back to literal parsing for the ag-ui
exception (not in registry).
- Replaces the proxy.conf.json content assertion with a proxy.conf.mjs
existence + `portsFor('<name>')` call check. Drift is impossible
because the .mjs templates from the same registry.
- Legacy proxy.conf.json branch retained for ag-ui (single-cap
exception).
79/79 cockpit unit tests pass locally.
0 commit comments