Skip to content

Un-red main: fix orphan-gate false positives, guard degraded generation, surface red main - #945

Merged
Noisemaker111 merged 11 commits into
mainfrom
claude/sweep-games-upstream-work-bsh1wa
Jul 16, 2026
Merged

Noisemaker111 merged 11 commits into
mainfrom
claude/sweep-games-upstream-work-bsh1wa

Conversation

@Noisemaker111

@Noisemaker111 Noisemaker111 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Main's checks CI job has been red since the curated-barrels PR (#885) merged, and nobody could see it: PRs run only the quick job, the real gates run post-merge on main where no session listens. Every cloud session since then hit the same wall locally, misread it as its own bug, and burned time re-diagnosing. This PR fixes the failures themselves plus every mechanism that let them merge, hide, and recur — and, after merging today's main back in, all the additional breakage that landed on main while it was red-blind.

The mechanisms (why this kept happening)

  1. 31 false orphans — the orphan gate checked each symbol per skill, so barrel re-exports (@jgengine/core/world, core/gameplay) attributed to the main jgengine skill flagged symbols documented in their domain skill, and the shrink-only ratchet made them un-baselinable. This kept check-types red on main.
  2. Silent generator corruption — with dist missing (every fresh container), ts-morph silently dropped whole modules, corrupting api.md and baselines with no warning.
  3. Rollback of good workgen-skill-api-safe restored all generated files whenever the inner gate failed, and printed "Pruned N entries" for writes it undid.
  4. .test.tsx broke builds — every package's build excludes covered only .test.ts.

Mechanism fixes

  • Orphan check unions skill tokens across all skills: a primitive surfaced in any SKILL.md or adopted anywhere passes everywhere; pruned 97 stale baseline entries (shrink-only ratchet passes).
  • gen-skill-api hard-fails with a clear message when any extracted package lacks dist.
  • Gen mode exits 2 when generation completed but gate failures remain; the safe wrapper keeps valid generated files and only rolls back on real corruption/crash.
  • PR quick job now runs bun run build + check-skill-api (merged with main's check-orphan-ratchet addition) so this failure class can't merge unseen again.
  • When main's aggregate CI job fails on a push, a step files/updates a "CI red on main" issue — red main becomes a visible signal instead of a tax on the next session.
  • All 11 packages' build excludes cover .test.tsx; CLAUDE.md/AGENTS.md updated and resynced.

Red-main fallout fixed (found by running the full gate on merged main — none of it compiled or passed before)

  • core: EditorDocument lacked the catalogs field and ParamSchema import its own editor code referenced (feat(editor): gameplay data catalogs via game-exported ParamSchema #900); three document constructors updated.
  • shell: AuthoredScene lost its placeObjects prop/render in the liveDocument refactor (feat(editor): two-way live doc-patch sync (#860) #904) but kept the dangling consts; defineGame loop hooks now satisfy feat(core): defineGame composable systems with per-system scheduling #942's Required<GameLoop> contract.
  • editor: missing seedEditorCatalogs/EditorCatalogDefinition/CatalogsPanel imports, undefined catalogById, readonly-array mutation, frozen editor loop missing hooks; cli.ts referenced an undefined variable and never wired in parseEditorCliArgs/loadRpcPayload, leaving --rpc-file/stdin (and their tests) dead — now wired.
  • games/apps: claudecraft's headless tests drove the raw loop export while feat(core): defineGame composable systems with per-system scheduling #942 moved combat into systems — now drive the composed loop (7 tests un-failed); apps/dev demos + the-robots updated for the new contracts; tower-guard's editorCatalogs.ts kept at the loader's src/ convention with check-game-shape taught the skeleton file; stale export manifest regenerated; jgengine-gameplay SKILL.md trimmed back under the size ratchet; retired jgengine-procedural reference removed from the barrel generator and the drifted gameplay barrel regenerated.

Verification

  • bun run gate fully green on the merged tree: preflight, every check gate, 4821 tests across 536 files, build.
  • Dist guard manually verified (removing a package's dist makes generation refuse loudly).
  • Claudecraft failures confirmed pre-existing by running the same tests on clean origin/main before fixing.

Once merged, main's checks job should go green for the first time since #885.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB

claude added 3 commits July 16, 2026 21:45
…an issue

- Orphan check now unions skill tokens across all skills: a primitive surfaced
  in any SKILL.md or adopted anywhere passes everywhere. Kills the 31 false
  orphans created when curated core barrels re-listed deep symbols under the
  main jgengine skill (whose docs never name them) — the failure that has kept
  main's checks job red and could not be baselined (ratchet is shrink-only).
- gen-skill-api hard-fails when any extracted package lacks dist instead of
  silently dropping modules and corrupting api.md/baselines.
- Gen mode exits 2 on gate failures so the safe wrapper keeps valid generated
  files instead of rolling back legitimate regeneration.
- PR quick job now builds and runs check-skill-api so this failure class can
  no longer merge unseen; red main auto-files/updates a 'CI red on main' issue.
- tsconfig.build excludes cover .test.tsx (first .tsx test broke builds).
- Prune 97 orphan-baseline entries resolved by the union fix; regen stale
  capabilities.md; resync AGENTS.md with CLAUDE.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
…arrel

- gen-barrels/barrels.test still referenced jgengine-procedural after #883
  retired the skill dir, crashing the sync tests (ENOENT); procedural.ts
  stays as a frozen compat barrel.
- Regen gameplay barrel: survival symbols now route there, and document the
  four survival types the barrel newly surfaces.

These test failures were invisible for the same reason as the orphan gate:
main's CI dies at check-types before tests run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
jgengine-web Ignored Ignored Preview Jul 16, 2026 10:22pm

claude added 5 commits July 16, 2026 21:56
…ractions)

Upstream PRs merged red-on-red and never compiled together — invisible for
the same reason this PR exists (PR CI runs no build; main CI red, unseen):
- core: EditorDocument lacked the catalogs field and the ParamSchema import
  its own editor code referenced; three document constructors updated.
- shell: AuthoredScene lost the placeObjects prop/render in the liveDocument
  refactor but kept its consts; defineGame loop hooks now satisfy the
  Required<GameLoop> shape from #942.
- editor: missing seedEditorCatalogs/EditorCatalogDefinition/CatalogsPanel
  imports, undefined catalogById map, readonly-array push, frozen editor
  loop missing onReset/onDispose.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
…ractions)

Upstream PRs merged red-on-red and never compiled together — invisible for
the same reason this PR exists (PR CI runs no build; main CI red, unseen):
- core: EditorDocument lacked the catalogs field and the ParamSchema import
  its own editor code referenced; three document constructors updated.
- shell: AuthoredScene lost the placeObjects prop/render in the liveDocument
  refactor but kept its consts; defineGame loop hooks now satisfy the
  Required<GameLoop> shape from #942.
- editor: missing seedEditorCatalogs/EditorCatalogDefinition/CatalogsPanel
  imports, undefined catalogById map, readonly-array push, frozen editor
  loop missing onReset/onDispose; new CLI/RPC plumbing exports marked
  @internal (no external adopters).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
The systems paragraph from #942 grew it 2 lines past baseline — another
red-main-invisible failure; merged into the barrel-import paragraph.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
apps/dev demos and the-robots/tower-guard were never updated for today's
upstream contract changes (required onReset/onDispose, EditorDocument
catalogs) — same red-main blindness; all 29 workspaces typecheck again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
claude added 2 commits July 16, 2026 22:17
…posed loop

Both pre-existing on merged main: #942 moved claudecraft combat into
systems but its headless harness still ticked the raw loop export, and
the export manifest was never regenerated for today's new modules.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
More half-landed upstream: cli.ts referenced an undefined options var and
never used parseEditorCliArgs/loadRpcPayload, so --rpc-file and stdin
paths (and their tests) were dead. The catalog loader convention is
src/editorCatalogs.ts — check-game-shape now allows that skeleton file
instead of forcing it under src/game/ where the loader can't find it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYn1uP6nf8maGvAvHFNjB
@Noisemaker111
Noisemaker111 merged commit 37edfd4 into main Jul 16, 2026
8 checks passed
@Noisemaker111
Noisemaker111 deleted the claude/sweep-games-upstream-work-bsh1wa branch July 16, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants