Commit Graph
2047 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.6 b86bb00a55 refactor(simulation): PR #137 review — audit override + regression tests + docs
Addresses Tyre, Hoshe, and lead review comments on PR #137:

- **Audit doc amendment** (Tyre E1 / Hoshe H1 / Lead): add "Lead override
  (2026-04-21)" section at top of docs/architecture/sprint-37-878-audit.md.
  Rewrites the conclusion to "DECISION: STRIP" with the cascade-based
  rationale. Preserves the original audit body as the pre-override record.

- **Regression tests** (Lead 2a-2b / Hoshe H2 / H3): add POSITIVE
  assertions of the new uniform behavior so silent reintroduction fails.
  - `phase2_container_verb_labels_uniform_regardless_of_player_state` —
    two trials (empty KG, POI-bearing KG) assert container verb labels
    equal Phase-1 defaults.
  - `monologue_pool_selection_uniform_no_archetype_key` — two observers
    with divergent MonologueState both draw from OBSERVE_NPC_LINES.

- **Decision record amendments** (Lead 3 / Tyre S2): D-032, D-035, and
  D-057 amended with Phase 6 deferral wording. "Retired pending Phase 6,
  not deferred with scaffolding." Reintroduction gate: a confirmed
  Phase 6 character-model design.

- **types.rs doc fixes** (Tyre S1 / Hoshe H5): StartupMessage protocol-
  flow comment updated to reflect no-version handshake (D-192).
  ObserverSnapshot version-history block grows a "Sprint 37 wire-format
  shifts" section documenting D-192 + #878 schema drops.

- **observer/tests.rs:944 comment** (Hoshe H6): rewritten to cite
  cascade rationale instead of the stale D-032-SUPERSEDED premise.

- **tests/run-atlas-determinism exit** (Hoshe H7): exit 0 when EXIT_CODE=2
  (venv/DB missing = skip, not fail). Preserves skip semantics for
  tests/run-all on machines without the Python venv.

Follow-up tickets filed:
- #895 (server, low): expand check-systems-db-stamp GENERATOR_SOURCES
  to cover gemma_naming.py + naming_core.py (Tyre S3).
- #896 (planning, low): add CLAUDE.md carveout for server wiki writes
  closing coverage gates (Tyre S4 / Hoshe H8).

H4 investigation: v01_integration_playthrough.rs was not the only E2E
handshake→tick→snapshot test; coverage preserved by bridge_ipc.rs,
bridge_tcp.rs, and game_loop.rs (the latter is pre-existing-broken
per #885). No replacement test needed.

1142/1142 lib tests pass. cargo clippy -- -D warnings clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 10:09:35 +02:00
jpmschweitzerandClaude Opus 4.6 8f46048a75 style(simulation): cargo fmt
Formatting normalization caught by pre-push hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 09:04:38 +02:00
jpmschweitzer 94a687fc08 Merge remote-tracking branch 'origin/main' into sprint-37/server
# Conflicts:
#	CHANGELOG.md
#	Makefile
#	server/data/systems.db
2026-04-22 09:01:43 +02:00
jpmschweitzerandClaude Opus 4.6 f8407980db refactor(simulation): derive Default for MonologueState (clippy)
After #878 removed the `character` field, the manual Default impl is
derivable. Clippy flags this under `derivable_impls` with -D warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:58:42 +02:00
jpmschweitzerandClaude Opus 4.6 68ef5cb380 chore(meta): update changelog for sprint 37 server
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:57:00 +02:00
jpmschweitzerandClaude Opus 4.6 11db2f4b41 docs(architecture): sprint 37 archetype-trace audit (#878)
Tyre's trace of every live consumer of CharacterArchetype across server
and client, with the cascade-based rationale for full removal. Captured
so future audits don't repeat the same investigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:56:21 +02:00
jpmschweitzerandClaude Opus 4.6 cae3d3ab85 refactor(simulation): strip archetype trace + HeritageRoot per cascade (#877, #878)
Sprint 37 dead-code sweep closing out two stale supersession chains:

#877 (D-167, 2026-03-24): Removes HeritageRoot type alias and
ZonePaletteModifier::Heritage variant from server/src/simulation/
generator.rs. The 7 abstract heritage roots were retired in favour of
the corridor cultural system; these two stubs were the only remaining
references.

#878 (D-032 + cascade rule): Strips the entire CharacterArchetype
(Smuggler/Detective) trace from the server. Per lead direction
2026-04-21 and the development cascade (CLAUDE.md), character/NPC/
verb-differentiation/monologue code is Phase 6 detail that should
not exist in code yet. The running archetype trace was pre-cascade
filler, not production — production is only the client's character-
creation UI and insert screens (client follow-up in #882).

Deleted:
- CharacterArchetype enum + StartupMessage.character_archetype field
- archetype_verb_label() + archetype branch of apply_phase2_verb_filter
  (D-057 character-verb differentiation — marked superseded)
- MonologueState.character partitioning
- Gauntlet archetype plumbing (setup_gauntlet no longer takes an archetype)
- server/content/schemas/drama_module.schema.yaml (zero Rust consumers)
- server/content/modules/tier1/smuggling_ring_v0_1.yaml
- server/tests/archetype_monologue.rs (regression guard for the removed system)
- server/tests/v01_integration_playthrough.rs (archetype-dependent)

Decision updates:
- decisions/content.md D-032 supersession rewritten to cite the cascade
  (v0.2 drop invalidated the prior D-117 framing).
- decisions/content.md D-035 tag taxonomy: `character` enum footnote
  updated; field noted as unused, do not reintroduce without a
  confirmed Phase 6 design.
- decisions/perception.md D-057: archetype-verb differentiation marked
  superseded.

Also bundles the types.rs version-field removal from #874 since the
file was already touched here.

Full trace audit in docs/architecture/sprint-37-878-audit.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:55:48 +02:00
jpmschweitzerandClaude Opus 4.6 c640563fc0 refactor(simulation): drop PROTOCOL_VERSION from bridge handshake (#874, D-192)
Removes the PROTOCOL_VERSION lockstep handshake across the bridge
transports. HandshakeMessage is now an empty marker indicating the
server is ready; the client sends StartupMessage next. Field-presence
and roundtrip behavioral tests are retained — tautological
version-literal assertions were deleted in Sprint 36.

After this lands, genuine schema drift surfaces as MessagePack
missing-field errors downstream, which is the intended signal per
D-192. Client ticket #875 is blocked by this commit and will ride
the same wave; server schema changes in #878 (character_archetype
removal) also depend on PROTOCOL_VERSION already being gone.

types.rs changes are bundled with the broader #877/#878 dead-code
sweep in the following commit, since they share the same file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:55:19 +02:00
jpmschweitzerandClaude Opus 4.6 bae1c5e156 data(economy): close D-175 Phase 2 coverage gate — 21 raw-commodity gaps (#860)
Adds and expands wiki/corporations/*.md entries so make economy-db
Phase 2 gate passes end-to-end without the 21 raw-commodity / system
coverage failures. Unblocks Phase 2 demand simulation.

Existing corporations (15): tag additions to baektu-mining-alliance,
bergkraft-antriebswerke, bifrost-marmor, gate-corporation,
hanyang-precision, jeju-lattice, nordmark-skog, norrland-woodcraft,
salud-alliance, shetland-wool, societe-chimique, stalownia-kowalski,
svanevann-waters, thrds, tongyeong-drive.

New corporations (6): arbour-aggregates, earth-standard-group,
rush-mining, scapa-flow-industries, sede-chemical-works,
threshold-fuel-syndicate.

systems.db regenerated — coverage validation now passes.

Cross-team scope note: wiki/ is copy-team territory per CLAUDE.md.
Writes here are accepted by lead for this sprint (maintenance sweep,
pragmatic fix); copy-team review follow-up filed as #884.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:55:05 +02:00
jpmschweitzerandClaude Opus 4.6 7fffdc572e test(assets): atlas determinism smoke test (#847)
Adds tests/run-atlas-determinism — imports generate_atlas as a module
and calls process_body() twice with seed=42 and dry_run=True, comparing
the returned markers dicts as JSON. No wiki files are written.

Guardrail against determinism regressions in terrain analysis, city
placement, A* road routing, infrastructure MST, and gate terminal
placement. GJ892f (domed, population 300, 1 city) is the smallest
well-exercised case.

Makefile target: make test-atlas-determinism.
Wired into tests/run-all alongside run-ipc-integration and run-visual.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:54:47 +02:00
jpmschweitzerandClaude Opus 4.6 531bb1df5c refactor(assets): atlas naming — dedup, compass filter, river vocab, infra names (#853)
Addresses five of seven subtasks from atlas-generator-refinement-notes:

- Cross-body dedup: corpus keyed by (corridor, feature_type) instead of
  (system_id, feature_type), seeded from existing atlas_* rows so re-runs
  don't collide with already-committed names. §1, §2.
- Empty-name fallback for mountain ranges when Gemma returns fewer names
  than needed ({body_proper} Range {i+1}). §2.
- Suffix monotony detection: flags bodies where >40% of mountain names
  share a trailing word (warning only — batch pipeline has no voice
  access for auto-fix). §3. Follow-up in #886.
- Compass-direction ban: build_batch_prompt explicitly forbids
  "Eastern/Northern/Western X" in few-shot instructions. §4.
- River vocabulary filter: is_valid_name rejects "X Flow" / "X Current"
  when feature_type="river" — these are ocean terms bleeding through. §6.
- Infrastructure naming: deterministic post-pass assigns "{CityA}–{CityB}
  {corridor_suffix}" to unnamed roads and railroads (Corridor/Road/Estrada/
  Strasse/Track by corridor). §7.

Cultural-history prompt threading (§5) remains as existing corridor_substyles
refill mechanism; explicit cultural-history blurb deferred to #886.

naming_core bumped to v0.3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:54:37 +02:00
jpmschweitzerandClaude Opus 4.6 9f755f2a62 feat(simulation): persist SelectedBookmark across save/load (#863, #862)
Adds Serialize/Deserialize to SelectedBookmark and wires it into
SaveStateV1 so a loaded game remembers which bookmark and starting
location the player picked. Replaces the TODO at bookmark/mod.rs:95
(originally deferred to Sprint 37 alongside #614).

Also refactors BookmarkPlugin to accept an injected BookmarkRegistry
via BookmarkPlugin::new(registry) (#862). The Default constructor
still wires the canonical tycoon registry — injection is for tests
and future TOML loading. Flagged in PR #132 review as a follow-up.

Updates bookmark spec §4.4 to remove the v0.2-deferred scope note.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:54:21 +02:00
jpmschweitzerandClaude Opus 4.6 7c40067935 fix(simulation): lower storyteller activation_pass log to debug (#789)
The "no co-present NPC assigned to a Simmering triangle" branch fires
as WARN every few seconds during early gameplay when no NPC relationships
have escalated. This is normal state, not an error condition — downgrade
to debug so the warning channel reflects actual problems.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:54:09 +02:00
jpmschweitzer 5b68c4ce80 Merge remote-tracking branch 'origin/sprint-37/ci' 2026-04-22 08:47:27 +02:00
jpmschweitzerandClaude Opus 4.6 06838043fd chore(meta): update changelog for review-fix pass (PR #136)
Corrects the "three generators" wording after the brand pipeline merge.

Refs: PR #136

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:39:03 +02:00
jpmschweitzerandClaude Opus 4.6 3d9dd7d909 chore(ci): merge brand pipeline into import_economics + harden review findings
Addresses all blocking + minor items from PR #136 review.

Architectural change (T2/H3 — the review's main complaint):

  generate_brands was previously a separate Rust binary that produced a TOML
  artifact, with its stamp written "on behalf" by import_economics.py at the
  end of its own run.  Reviewers flagged the invisible coupling: two sources
  of truth in a system designed to have one, and no way to tell from the
  stamp that one "generator" was really a subroutine of the other.

  import_economics now invokes tooling/generate-brands as the first step of
  its main() flow, before opening its own DB connection.  The TOML artefact
  is still produced and still committed (useful for diff-review of brand
  changes), but there's now one pipeline owner.  The meta table carries two
  rows (import_economics, generate_atlas) not three; the Rust binary's
  source SHA folds into import_economics' stamp via IMPORT_ECONOMICS_SOURCES.
  A MIGRATION_SQL DELETE cleans up pre-merge DBs that still have the
  orphan generate_brands row.

Other review items addressed in-line:

  H1  generate_atlas._write_stamp no longer commits — transaction ownership
      stays with the caller (matches import_economics pattern).  Stamp +
      atlas data now commit atomically; a failed stamp rolls back the
      atlas data rather than leaving a stamp-missing-data intermediate.

  H2  _file_sha1 (in both import_economics, generate_atlas,
      check-systems-db-stamp) raises FileNotFoundError on missing sources
      instead of silently contributing an empty-bytes hash.  A ghost-SHA
      convergence could otherwise produce vacuous "fresh" passes.

  H4  pre-push no-meta-table warning rephrased — was "run after next
      regeneration", now "run now if this DB was generated by you".

  T1  asset-pipeline.md determinism claim softened: the stamp is
      deterministic (same source → same recorded SHA), the DB binary is
      not (generated_at + SQLite rowids/freelist churn).

  T3  asset-pipeline.md gains a "migration escape hatch" section naming
      MIGRATION_SQL in import_economics.py as the only sanctioned path
      for direct writes, and forbidding hand-run sqlite-exec / one-off
      patch scripts / SQLite-GUI edits.

  T4  Makefile regen-db now runs as a single shell with `set -e`.  A
      failure in one generator halts the pipeline immediately, preventing
      the "stale data, fresh stamp" state where a later step stamped a
      DB whose earlier step had failed.  import_economics' exit code 2
      (coverage gate warning) remains explicitly tolerated.

  T5  pre-push stamp check now runs on a branch's first push too —
      compares against origin/main instead of origin/$BRANCH, closing
      the gap where a new branch could ship a stale DB via the first push.

  T6  check-systems-db-stamp fails closed on unknown generator_names in
      meta — a future branch adding a new generator without registering
      it in GENERATOR_SOURCES will now be rejected, not silently skipped.

  T7  /pr-push watch list gains a mutual cross-reference comment with
      GENERATOR_SOURCES in check-systems-db-stamp, plus the missing
      names.rs source file, so the two lists cannot silently drift.

Follow-up tickets created:

  #887 T8  decisions-orphan-tickets CLI — surfaces tickets whose
           decision_ref points at a non-existent D-record.
  #888 T9  meta.schema_version monotonic semver — for savegame migration
           lineage in Phase 5+ (SHA comparison can't be ordered).

Verified:

  make regen-db end-to-end — OK
  make check-systems-db    — OK, 2 generator(s) up to date
  STALE detection          — OK, verified by touching generate_atlas.py
  /pr-push watch list      — OK, flags this branch's changed sources
  decision show D-159      — OK, structured output with tickets + refs

Refs: #855 #856 #857 #858 #859 PR #136

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:38:41 +02:00
jpmschweitzer e522091f74 chore(skills): pin team-mode teammates to Sonnet 4.6
Sprint 37 observed Opus 4.7 teammates in team mode ignoring scope
rules ("don't modify files outside your team"), leaving tasks
half-done, and failing to report back via SendMessage. Closest public
issues are anthropics/claude-code#47598 (4.6 subagent delegation
regression) and claude-agent-sdk-python#577 (SendMessage delivery in
team mode). No 4.7-specific team-mode issue published yet but symptoms
are real.

Fix: every Task spawn with a team_name argument now passes
model: "sonnet". The team lead (the session running the skill) stays
on whatever model the user selected — typically Opus.

Inline Agent spawns without team_name (one-shot reviewers in
/pr-review, research subagents, general-purpose one-offs) are
exempt — they keep their default model. The pin targets long-running
coordination specifically, not every Agent call.

Affected skills:
- sprint-start: step 8d Task template adds model: "sonnet" and
  documents the rule with the 4.7 regression context
- workshop-start: step 5 spawn list adds the model pin with a
  one-line reason
2026-04-22 08:31:37 +02:00
jpmschweitzerandClaude Opus 4.6 07ca1c9fc1 chore(meta): update changelog for sprint-37 CI sweep
Refs: #723 #854 #855 #856 #857 #858 #859

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 17:35:55 +02:00
jpmschweitzerandClaude Opus 4.6 a41f7aa06c feat(tooling): add decision show <D-NNN> with implementing tickets + refs
Closes the decision-to-ticket coverage gap (#723). The `decisions-coverage`
Makefile target already reported per-decision counts; this adds the
single-decision drill-down via `tooling/db/decision show D-159`, returning
linked tickets, outbound refs, and inbound refs in one shot.

Schema unchanged — reverse link is a SELECT on tickets.decision_ref.

Refs: #723

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 17:35:23 +02:00
jpmschweitzerandClaude Opus 4.6 5079d84405 docs(ci): document source-canonical asset pipeline rule
Adds `.claude/rules/asset-pipeline.md` describing the full pipeline —
generators, meta stamp, pre-push hook, how to make DB/schema changes,
and why direct systems.db edits are forbidden. CLAUDE.md and DEVOPS.md
point at the rules file; sprint-start template now reminds teammates
to read it before touching DB sources.

CLAUDE.md also gains the missing `decision show` row in the CLI tool
table (companion to #723's `decision show` subcommand).

Refs: #859 #723

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 17:35:12 +02:00
jpmschweitzerandClaude Opus 4.6 44d7816b55 chore(skills): extend /pr-push with rebase + regen + stage for generator branches
Adds a new step 4a that detects generator-source or economy-data changes
vs origin/main and runs `make regen-db` before the push, staging the
updated systems.db. Pairs with the pre-push hook (#857) — instead of
rejecting a stale DB, /pr-push proactively freshens it.

Refs: #858

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 17:35:01 +02:00
jpmschweitzerandClaude Opus 4.6 8371e05e52 chore(ci): generator-driven asset pipeline — meta stamp + hook + regen target
Adds systems.db regeneration discipline (#855) via a `meta` table (#856)
stamped by every generator, a pre-push hook that rejects stale DBs (#857),
and the top-level `make regen-db` / `make check-systems-db` targets that
drive the whole pipeline.

The stamp stores SHA-1 of generator source + schema, so the pre-push hook
can cheaply detect "you changed a generator but forgot to regen the DB"
before a binary merge conflict lands. Sprint 36 hit that class of conflict
on two branches touching systems.db simultaneously — this is the systemic
fix.

Regenerated systems.db is stamped; `make check-systems-db` passes.

Refs: #855 #856 #857

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 17:34:52 +02:00
jpmschweitzer f0465e40c1 chore(skills): sprint-start A1c — mandatory teardown, no pre-checks
The worktree cleanup step was documented as "safe to skip if the
sprint didn't use ephemeral worktrees" — which invited a pre-check.
Sprint 36 close did that pre-check from inside the repo root, where
.sprint/ doesn't exist, concluded no worktrees, and skipped teardown.
Three stale worktrees persisted until Sprint 37 planning surfaced them.

Fix: always run the script (idempotent, prints a graceful message when
empty). Document that .sprint/ is a sibling of the repo root, not a
child, so future sessions don't repeat the same ls-based pre-check.
Add a post-run verification step.
2026-04-21 16:05:05 +02:00
jpmschweitzer 8b3baf511f chore(meta): plan Sprint 37: Sweep — 25-ticket spring-clean sprint
Tickets:
- ci (7): #854, #855, #856, #857, #858, #859, #723
- server (9): #853, #860, #862, #863, #874, #877, #878, #789, #847
- client (6): #866, #869, #870, #872, #873, #875
- copy (3): #861, #865, #876

Themes: asset pipeline discipline, PROTOCOL_VERSION removal (D-192),
D-167 HeritageRoot purge, D-032 smuggler/detective enum audit, New Game
regression fix + merge-path test coverage, copy wiki residue purge,
bookmark save-state, generator quality patches.

Debt surfaced from Q/D-record sweep: Q-095 Commission name, D-167 and
D-032 residue, plus spring-cleaning pulls from stale backlog (#789,
#847, #723, #862).

#868 cancelled (superseded by #874 + #875).
2026-04-21 16:00:22 +02:00
jpmschweitzer 2ae836c18a chore(skills): sprint 36 retro process improvements
- pr-review: require manual smoke test for merge-path PRs (pre-game flow,
  scene transitions, save/load, connection handshake). Unchecked
  author-side smoke boxes downgrade verdict from APPROVED to
  REQUEST_CHANGES. Triggered by #872 — New Game hangs on 'connecting'
  landed through PR #134 with the exact smoke box unchecked.
- pr-push: wipe Godot script class cache before the runtime smoke check
  so cold-start parse-order bugs surface pre-push instead of failing
  the next fresh-clone parse. Sprint 36 hit this post-merge — MetaScreen
  base class not found because the cache was warm on developer machines
  but cold in CI / post-merge. Cold-cache check stays in the skill (not
  the pre-push hook) to keep iteration fast.
v0.1.36
2026-04-21 15:30:14 +02:00
jpmschweitzer 5ac9092f71 chore(meta): release v0.1.36
Sprint 36: Forge — 15/15 tickets complete (100%).

Highlights:
- MetaScreen pattern foundation + Option A pre-game flow (#618, #680)
- Protocol v23 with bookmark_catalog; D-192 deprecates PROTOCOL_VERSION lockstep
- 124 notable brand corps across 8 categories (#828)
- Core-world atlas cohesion pass across 5 systems + Sol bodies (#849)
- Unified implant/map chain per D-191 (#844)
- ImplantApp pattern base class + registry (#844, #824, #836)
- Bookmark definition and location-to-culture resolution (#614, #679)
- generate_brands pipeline — 10K minor brands (#829)
- D-078 overheard conversation system retired (#848, #842)
2026-04-21 15:29:57 +02:00
jpmschweitzer 9731270c52 Merge remote-tracking branch 'origin/sprint-36/client' 2026-04-21 14:39:39 +02:00
jpmschweitzer 50ac9041ad fix(tests): PR #134 review round 3 — seed start-state + PID log path
- test_character_creation_sprint28: before_each now seeds
  _selected_bookmark_id and _selected_location_id so the new disabled-
  guard in _on_start() (round 2) doesn't silently block 5 existing
  tests that call _on_start()/KEY_ENTER without setting up a valid
  bookmark selection. Restores the 2 tests Hoshe flagged as R2-H1 plus
  3 siblings that would have degraded the same way under the guard.
- tests/run-godot: LOG_FILE now includes $$ (PID) so concurrent runs
  across worktrees don't clobber each other's logs. Path is echoed
  back via the stdout JSON "log" field and the stderr hint line, so
  callers never need to predict it (R2-H2).
2026-04-21 14:30:38 +02:00
jpmschweitzer 53fbce08fb chore(tests): hard 300s timeout + on-disk log + context-safe output
Makes tests/run-godot self-containing so neither humans nor LLM callers
have to remember to wrap it in a timeout or pipe it into a file. A hung
test now kills cleanly at 300s with a clear TEST_TIMEOUT marker and
bisection hint instead of silently burning an hour of wall clock (as
Sprint 36 learned).

- Godot+gdUnit4 output goes to /tmp/sr-run-godot.log (overwritten each
  run). Nothing streams to stdout/stderr — 20k+ lines of test log into
  a terminal or an LLM context is unworkable.
- Stdout: one-line JSON summary, with a "log" field pointing at the
  file. On timeout adds "timeout":true and "timeout_sec":300.
- Stderr: a short hint block. On pass: one line. On failure: three
  commands to inspect the log. On timeout: a bisection recipe.
- Single well-known path instead of an env var — worktrees each want
  their own value and the indirection makes the hint lines meaningless.
  Concurrent runs are the caller's problem.
- timeout(1) --foreground --kill-after=10 to escalate to SIGKILL if
  Godot ignores SIGTERM.
2026-04-21 12:02:25 +02:00
jpmschweitzer 1b8e227413 refactor(ui): PR #134 review — MetaScreen/ESC chain tightening, D-192 reword
Addresses Tyre's 9 architecture items from the sprint-36 client review.

- decisions/architecture.md (Tyre #1): D-192 now says "deprecate; removal
  tracked in #868" instead of "remove". The branch does not remove the
  version field or guard — that belongs in the coordinated server+client
  PR. The decision text now matches the code on this branch.
- meta_stack.gd (#2): handle_escape() on a screen with
  closable_by_escape=false now consumes the event unconditionally. Was
  returning whatever on_escape() returned, which default-returned false
  and leaked ESC into main.gd's implant/settings chain — opening the
  settings dialog behind the loading screen.
- debug_console.gd (#4): drop the direct KEY_ESCAPE branch in
  _unhandled_input. ESC now falls through to main.gd → MetaStack, which
  finds the console on top of the stack and closes it via the normal
  path. Other keys are still consumed so movement/action can't leak.
- main.gd (#6, #10): extract the ESC priority chain into
  _handle_menu_key() so "MetaStack → implant → settings" is a named
  thing. Add a comment near connect_to_sim explaining that
  GameState.bookmark_catalog survives the Option A scene transition via
  the autoload.
- main_menu.gd (#7): header comment documenting the double LoadingScreen
  lifecycle — safe today because main_menu.tscn and main.tscn never
  co-exist, noted for future promotion to autoload if that changes.
- meta_screen.gd (#8): apply captures_input symmetrically in open()/
  close() — was set in open() only, so a screen changing the flag
  between open+close kept the opened value forever.
- meta_screen.gd (#9): on_escape() docstring clarifies the tri-state
  (consume-and-hold / consume-and-close / ignore) — and that
  closable_by_escape=false is the screen-wide way to say
  "consume-and-hold".
- bug_report_dialog.gd (#11): capture_cancelled now emits from
  on_close() (covers any close path — ESC, MetaStack pop, programmatic
  close) rather than only on_escape(). A new _completed flag
  distinguishes completion from cancel so the two signals stay
  mutually exclusive.
2026-04-21 12:02:09 +02:00
jpmschweitzer effb83a0d6 fix(ui): PR #134 review — character creation bugs + protocol default
Addresses Hoshe's 3 code-quality items from the sprint-36 client review.

- character_creation: drop CARDINAL_NAMES (was [south, east, north,
  west]) and use CARDINAL_DIRS ([south, west, north, east]) for both
  facing and screenshot filename label. The two arrays indexed by the
  same _screenshot_cardinal_idx produced swapped labels at indices 1
  and 3 — screenshots at those positions had filenames that did not
  match the character's actual facing.
- character_creation: Enter/KP_ENTER now honors _footer_start.disabled.
  Without a bookmark selected the Start button disables, but the
  keyboard path called _on_start() unconditionally — a player could
  confirm creation with empty bookmark/location strings. Guard at the
  top of _on_start.
- protocol.gd: raw_bm.get("career", "tycoon") hardcoded a content
  default in the wire decoder — a missing server field silently became
  "tycoon". Empty string is the correct protocol default;
  _make_bookmark_card already skips the career label when empty.
2026-04-21 12:01:48 +02:00
jpmschweitzer 3a074cb3fd docs(decisions): D-192 — drop PROTOCOL_VERSION lockstep handshake
Records the decision to remove the per-snapshot version field and the
PROTOCOL_VERSION constants on both server and client. Rationale: in our
subprocess deployment the client and server always ship together, so the
mismatch guard has only ever caught dev-time forgetfulness — and even a
future networked path is better served by a one-time connection-protocol
handshake than per-snapshot stamping. Implementation tracked in #868.
2026-04-21 09:48:36 +02:00
jpmschweitzer 8cd5405427 fix(tests): unstick compositor cleanup; drop tautological version asserts
test_character_visual_sprint28: after_test() was freeing every node
returned by get_children(), including GdUnit4's own internal infrastructure
attached to the suite. That destroyed the runner mid-suite, hanging
make test-client indefinitely on the second compositor test. Now tracks
the nodes _make_compositor() spawned and frees only those. Suite goes
from "hangs forever" to 52/52 pass in 39s.

test_protocol_bridge, test_signal_sprint24: delete the
test_protocol_version_is_NN assertions. They asserted a constant equals
its own literal, failed mechanically on every protocol bump, and never
caught a real bug. Field-presence and roundtrip behavior is covered by
the surrounding tests; the runtime mismatch guard is exercised by
test_rejects_version_6. Surfaced D-192 (drop the version handshake
entirely) — see ticket #868.
2026-04-21 09:48:26 +02:00
jpmschweitzer 9d09ee548e fix(ui): loading screen blocks input + main menu polls during catalog wait
- loading_screen: opaque BG (was 0.75 alpha) + mouse_filter STOP so the
  loading state genuinely occludes the underlying screen
- main_menu: poll SimBridge.poll_snapshot in _process while waiting for
  the bookmark catalog so the new-game flow doesn't stall on the
  catalog round-trip introduced in Workstream 3 (#680)
2026-04-21 09:48:00 +02:00
jpmschweitzerandClaude Opus 4.6 c68197f86a test(client): align test_character_creation_sprint28 to 4-tab structure
W5 restructured character_creation's TabContainer to 4 top-level tabs
(Bookmark, Appearance, Skills, Debug) from the old 5-tab flat layout.
Three assertions in test_character_creation_sprint28.gd still referred
to the old shape; they didn't fail because the suite runs vacuously
in headless (the 3D SubViewport scene can't instantiate without a
render context), but the assertions were stale and would fire wrong
once the suite eventually runs non-headless.

Fixed:
- test_tab_container_has_five_tabs → renamed test_tab_container_
  has_four_tabs, expected count 5 → 4.
- test_tab_names: expected ["Body","Head","Hair","Clothing","Debug"]
  → ["Bookmark","Appearance","Skills","Debug"]
- test_tab_navigation_wraps: current_tab = 4 (invalid on a 4-tab
  container) → 3.

Header note added documenting the vacuous-headless behavior so the
suite reads correctly.

88/88 pass — unchanged — but the assertions are now correct for
non-headless invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 22:40:04 +02:00
jpmschweitzerandClaude Opus 4.6 682bd821e3 feat(ui): Skills tab stub content (Workstream 8, #618)
Replaces the W5 placeholder inside the Skills tab with a properly
framed stub per Araminta's spec. Final workstream of the #618 + #680
+ MetaScreen implementation.

Content:
- MarginContainer (8 px sides, 4 px top — matches existing tab
  padding)
- Single centered Label: "Skills allocation — coming soon."
- DIM_TEXT color, font_body size (11 px), horizontally and vertically
  centered inside the tab content area

No inputs, no interactivity — real skill allocation lands in a future
sprint when the skills system exists server-side. Players selecting
a bookmark still proceed to Start regardless of what they see on this
tab.

Closes the implementation half of #618 (CK3-style character creation
screen) and #680 (location picker) — Hoshe's revised test plans for
MetaScreen pattern, #618, and #680 can now run end-to-end.

Verification:
- gdlint clean
- Headless parse + widened scanner check (per hardened pr-push skill)
  clean; pre-existing autoload class_name noise filtered.
- test_character_creation_sprint28 88/88, test_protocol 62/62,
  test_client_p3 24/24, test_ui_framework_sprint15 54/54

Next: Hoshe runs her full revised test gauntlet against the shipped
shape; if green, the PR pushes via /pr-push.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:44:48 +02:00
jpmschweitzerandClaude Opus 4.6 fb7cd357b8 feat(ui): location picker in Bookmark tab (Workstream 7, #680)
Adds the starting-location picker as a sub-component of the Bookmark
tab detail view, per Araminta's spec and D-128's "culture implicit in
location" constraint. Fills the space W6 reserved below the CAREER /
CAPITAL data rows.

Picker structure:
- "STARTING LOCATION" section label (DIM_TEXT, 10px, all-caps).
- ScrollContainer min_height=80 → VBoxContainer of selectable items.
- Each item: Button with child VBox carrying the location name Label
  (PRIMARY_TEXT, 12px) and an optional culture tag Label (DIM_TEXT,
  10px, mouse_filter IGNORE per D-128). Culture label is NOT rendered
  when `allowed_locations_cultures[i]` is empty — no "Unknown"
  placeholder, the row just shrinks.

Behavior:
- Clicking a bookmark card auto-selects its default_location in the
  picker (handled via _selected_location_id + _update_location_selection).
- Clicking a location item updates _selected_location_id and re-gates
  the Start button (already checked in W6).
- Switching bookmarks rebuilds the picker list for the new
  allowed_locations; prior selection cleared.
- Parallel-array length mismatch defended: reads
  `cultures[i] if i < cultures.size() else ""` so a short cultures
  array won't crash rendering.

D-128 compliance:
- No culture dropdown or filter anywhere.
- Culture tag Label is strictly display: MOUSE_FILTER_IGNORE, no
  signal handlers.
- CharacterProfile carries only start_location_id; no culture_id.

Other: removes W6's placeholder "Starting Location: X" ImplantDataRow
since the picker supersedes it; separator before the picker preserved.

Verification:
- gdlint clean
- Headless parse + scanner check (widened per hardened pr-push skill):
  no new errors. Pre-existing autoload class_name noise filtered per
  CLAUDE.md.
- test_character_creation_sprint28 88/88, test_protocol 62/62,
  test_implant_* all green, test_client_p3 24/24,
  test_ui_framework_sprint15 54/54.

Workstream 8 (Skills tab stub content) lands next — #618 closes then.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:28:02 +02:00
jpmschweitzerandClaude Opus 4.6 804bba6ae8 chore(skills): harden pr-push pre-checks — orphan processes, scanner errors
Two Sprint 36 lessons folded into the pr-push skill's pre-push
workflow.

1a (new, mandatory). Orphan Godot process check. `ps -eo pid,etimes,cmd
| awk` filter for `godot.*gdunit4-run` processes running longer than
5 minutes. Ask the user before killing. Blocks Sprint 36's failure
mode where stale background test-runner invocations (from an earlier
hung run) silently wedged fresh test runs by stealing CPU — an hour
of verification time lost to exactly this.

1c (widened). Headless parse + scanner check. The old grep was
`grep -i "SCRIPT ERROR"`, which missed Godot's resource scanner
category errors like "Export type can only be built-in, a resource,
a node, or an enum" — those surface as plain `ERROR` lines, not
prefixed `SCRIPT ERROR`. Widened to
`grep -iE "^(SCRIPT )?ERROR|Parse Error|Export type"` and filtered
against the known pre-existing autoload class_name parse-order
noise (Messagepack, LocalBridge, ServerProcess, Constants — per
CLAUDE.md's documented trap). Commit 84105916 shipped an
`@export var descriptor: CharacterVisualDescriptor` issue that the
narrower grep missed; Tyre caught it five commits later.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:27:23 +02:00
jpmschweitzerandClaude Opus 4.6 35858fa0fa feat(ui): Bookmark tab content + CharacterProfile signal payload (Workstream 6)
Fills in the Bookmark tab stubbed in W5 with the full spec from
Araminta: card list + detail view + start-button gating. Also changes
the creation_confirmed signal to carry a CharacterProfile instead of
bare CharacterVisualDescriptor, consolidating bookmark + location
selection into one payload object.

Bookmark tab (left pane, 35%):
- ScrollContainer over VBoxContainer of card Buttons, one per entry in
  GameState.bookmark_catalog. Each card: title (PRIMARY_TEXT,
  font_header 15px) / subtitle (DIM_TEXT, font_small 10px, clipped) /
  career badge (ACCENT_ACTIVE, all-caps). Selected state uses existing
  ITEM_SELECTED_BG + ITEM_SELECTED_BORDER. custom_minimum_size
  Vector2(180, 64).

Detail view (right pane, 65%):
- ImplantPanel composed via add_component:
  - ImplantHeader (bookmark.title, bookmark.subtitle)
  - ImplantSeparator
  - ImplantTextBlock (flavor, autowrap, PRIMARY_TEXT)
  - ImplantSeparator
  - ImplantDataRow CAREER (accent_active) / CAPITAL (accent_positive,
    format "%d Tractus") / STARTING LOCATION
  - ImplantSeparator
  - [location picker space reserved — W7 fills it]

Selection:
- Card click stores _selected_bookmark_id, auto-assigns
  _selected_location_id from bookmark.default_location, rebuilds
  detail view.
- Start button (footer) gated on both _selected_bookmark_id and
  _selected_location_id non-empty.
- Randomize while Bookmark tab is active picks a random bookmark +
  one of its allowed_locations and skips appearance randomization.

Signal contract change:
- creation_confirmed(profile: CharacterProfile) replaces
  creation_confirmed(descriptor: CharacterVisualDescriptor).
- CharacterProfile now extends RefCounted (was Resource) with
  non-exported fields — it's a one-shot signal payload, never
  persisted. This also sidesteps the scanner error that the prior
  @export var descriptor: CharacterVisualDescriptor on a Resource
  caused (RefCounted types cannot be @export-ed).
- _on_start emits a CharacterProfile built from _descriptor +
  _selected_bookmark_id + _selected_location_id, then sends
  ConfirmBookmark via SimBridge.send_named_action before scene
  transition.

Test updates:
- test_character_creation_sprint28.gd signal receivers switched to
  untyped to accept CharacterProfile without hitting class_name
  parse-order at test-suite scan time. 88/88 pass.

Verification:
- gdlint clean
- godot --headless --path client --quit — no SCRIPT ERROR (prior
  character_profile.gd scanner noise now gone after the RefCounted
  conversion)
- test_character_creation_sprint28 88/88, test_protocol 62/62,
  test_implant_nav_stack 52/52

Workstream 7 (location picker as sub-component of the Bookmark detail
view) follows. W8 fills the Skills tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 19:36:00 +02:00
jpmschweitzerandClaude Opus 4.6 88202ad679 test(client): triage 3 chronically broken test suites (Task #21)
Clean the regression signal for the remaining MetaScreen workstreams
by either fixing or surgically skipping tests that had been failing
for design reasons or against stale APIs.

test_sprint2_proof.gd — all 3 tests prefixed skip_test_. Root cause:
hardcoded Sprint 2 room coordinates + protocol v1 assumptions; not
adaptable to current protocol v23 or Gauntlet layout. Suite now reports
0 tests rather than 14 failures / 3 errors.

test_dialogue_sprint18.gd — 40 tests pass (was 48 errors / 3 failures).
Root cause of the errors: GameState.has() calls hitting Node.has()
which does not exist. Fixed by removing guards and accessing
GameState.current_examine_result directly (present since v14 / #174).
Two real bugs surfaced after the error noise cleared; skipped with
ticket references:
- #866 (high): dialogue_box._escape_bbcode chains .replace('[','[lb]')
  .replace(']','[rb]') which turns [lb] into [lb[rb]. BBCode injection
  guard broken.
- #867: confrontation_monologue signal doesn't fire in headless; the
  create_tween call in _start_confrontation_beat likely aborts before
  the emit.

test_client_p2.gd — 26 tests pass (was 2 failures). Three #117-fallout
camera-smoothing tests skipped (main.gd disables
position_smoothing_enabled permanently by design since #117 manual
lerp). One MonologueDisplay API test skipped pending #864 (asserts
mono.is_visible, but the display was refactored to _visible:
Array[Dictionary]).

No production code changes. Every skipped test carries a skip_test_
prefix + inline TODO pointing at the owning ticket. Bug tickets #864,
#866, #867 filed to the backlog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 19:33:57 +02:00
jpmschweitzerandClaude Opus 4.6 256703e9b7 feat(ui): 3-tab restructure of character creation (Workstream 5)
Consolidates the character creation TabContainer from 8 flat tabs
(Body / Head / Hair / Clothing / Accessories / Debug plus the two
being-added Skills / Bookmark) into 4 top-level tabs per Araminta's
revised spec: Bookmark, Appearance, Skills, Debug.

The existing five appearance sub-tabs (Body, Head, Hair, Clothing,
Accessories) now live inside the Appearance tab as a horizontal
segmented sub-navigation using the existing `_make_slot_btn()` pattern
— consistent with the Clothing/Accessories slot row vocabulary.
Selected sub-section uses existing ITEM_SELECTED_BG / BORDER styling.

Structural changes:
- New APPEARANCE_SUB_NAMES const lists the five sub-sections.
- Renamed _tab_search → _appearance_search, _tab_grids →
  _appearance_grids. Scope changed from "top-level tabs" to
  "Appearance sub-sections" but index 0..4 semantics preserved.
- Added _appearance_active_idx, _appearance_sub_btns,
  _appearance_sub_sections state.
- _ready() builds exactly 4 top-level tabs; tab builders invoked
  explicitly per index.
- New _build_bookmark_tab / _build_skills_tab render TEXT_DIM
  placeholder labels ("Bookmark content lands in Workstream 6", etc.)
  — actual content in W6/W8.
- _build_appearance_tab constructs the sub-nav strip and stacks all
  5 sub-sections up front with visibility-toggle swap
  (_on_appearance_sub_selected). Comment explains the up-front build
  choice and the free-and-rebuild fallback if performance regresses.
- Existing _build_body_tab / _head / _hair / _clothing / _accessories /
  _debug remain unchanged — they now receive Appearance sub-section
  Controls as their tab argument instead of top-level tabs. _make_tab_vbox
  anchors full-rect in both parent contexts, so layout is preserved.

Verification:
- gdlint clean
- godot --headless --path client --quit — no SCRIPT ERROR
- test_protocol 62/62, test_client_p3 24/24, test_ui_framework_sprint15
  54/54, test_implant_nav_stack 52/52, test_implant_registry 42/42,
  test_implant_app_lifecycle 36/36

Workstream 6 (Bookmark tab content: card list + detail view + location
picker per Araminta's spec) lands next. W7 (location picker as a
sub-component of Bookmark tab) follows. W8 (Skills stub content) is
last. Hoshe's parallel Task #21 (test hygiene triage) commits
separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:11:46 +02:00
jpmschweitzerandClaude Opus 4.6 2104348000 feat(client): Option A pre-game flow + ESC priority chain (Workstream 4)
main_menu now connects SimBridge before character_creation opens, gating
the transition on first ObserverSnapshot carrying a bookmark_catalog.
Loading screen is shown during the connect; on cancel the SimBridge
subprocess is torn down and the player returns to main_menu. Catalog is
read straight from GameState.bookmark_catalog in W6.

Flow (Option A):
1. New Game → SessionManager.new_game() creates save dir
2. main_menu pushes loading_screen via MetaStack with "Connecting to
   simulation..." message
3. SimBridge.connect_to_sim() spawned; main_menu listens on
   connection_state_changed, then on snapshot_received for the catalog
4. On catalog arrival: loading_screen closed, scene-transition to
   character_creation
5. character_creation Cancel → SimBridge.disconnect_from_sim() + scene
   transition back to main_menu (Tyre's recommendation: clean state per
   session over warm-start savings)
6. character_creation Start → ConfirmBookmark sent (stubbed for W4 with
   first catalog entry; real bookmark + location from W6's UI)

ESC priority chain in main.gd OPEN_MENU handler:
- MetaStack.handle_escape() first — closes the topmost meta overlay
- HudGroups.is_implant_active() / close_app() — closes active implant
- Fallback: toggle settings_dialog (existing W2 behavior)

Files:
- sim_bridge.gd: send_named_action(action_name, action_data) helper.
  Bridges named tag-enum PlayerActions (RequestBookmarkCatalog,
  ConfirmBookmark) into the existing outbound buffer, parallel to
  send_input's InputMapper.Action handling.
- loading_screen.gd: set_message(text) for the connecting/loading label.
- main_menu.gd: full Option A flow rewrite. Tracks _waiting_for_catalog
  so re-clicking New Game during connect is a no-op.
- character_creation.gd: _on_back disconnect path + _on_start
  ConfirmBookmark stub. MAIN_MENU_SCENE / GAME_SCENE constants.
- main.gd: connect_to_sim guard (don't reconnect when Option A leaves
  it CONNECTED). ESC chain wiring.

Verification:
- gdlint clean
- godot --headless --path client --quit — no SCRIPT ERROR
- test_protocol 62/62, test_implant_nav_stack 52/52, test_client_p3
  24/24, test_ui_framework_sprint15 54/54

Pre-existing failing suites unchanged: test_sprint2_proof,
test_dialogue_sprint18, test_client_p2 (camera-smoothing assertions
that pre-date W4 — main.gd has disabled position_smoothing_enabled
since #117 / #501 / #117 manual-lerp; tests were stale).

Workstream 5 (3-tab restructure of character_creation: Bookmark /
Appearance with sub-nav / Skills / Debug) lands next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 11:30:15 +02:00
jpmschweitzerandClaude Opus 4.6 41e895796c feat(client): protocol v23 — bookmark_catalog decode + bookmark actions (Workstream 3)
Adds client-side wire support for the bookmark catalog (#614) and the
two associated player actions. PROTOCOL_VERSION bumps from 21 to 23:
- v22 (server): RequestBookmarkCatalog + ConfirmBookmark player actions
- v23 (server): bookmark_catalog field on ObserverSnapshot

Decode:
- protocol.gd decode_snapshot extracts optional bookmark_catalog.
  Defensive parse of BookmarkWire fields (id, title, subtitle, flavor,
  default_location, allowed_locations, allowed_locations_cultures,
  career, starting_capital_tractus). Missing or malformed → null.
- snapshot_handler.gd caches the catalog into GameState.bookmark_catalog
  on each snapshot (server pushes on tick 0; re-fetchable via
  RequestBookmarkCatalog).
- GameState gains bookmark_catalog: Array = [] (untyped per autoload
  parse-order discipline; default empty so callers can iterate without
  null checks).

Encode:
- encode_request_bookmark_catalog() — unit variant, sent to trigger a
  re-push if the cached catalog is missing.
- encode_confirm_bookmark(bookmark_id, starting_location_id) — struct
  variant matching server rmp_serde shape. Called from character
  creation on Start (lands in Workstream 6).

Tests:
- 5 new cases in test_protocol.gd: hand-built bookmark_catalog decode
  (all 9 fields asserted), fixture-based decode round-trip, missing-
  field null behavior, RequestBookmarkCatalog encode roundtrip,
  ConfirmBookmark encode roundtrip.
- All 12 existing snapshot fixtures regenerated from server via
  `cargo test --test gen_fixtures -- --ignored`. The new
  snapshot_with_bookmark_catalog.msgpack fixture was generated by the
  same pass.

Verification:
- gdlint clean
- godot --headless --path client --quit — no SCRIPT ERROR
- test_protocol 62/62, test_client_p3 24/24, test_implant_nav_stack
  52/52, test_implant_registry 42/42, test_implant_app_lifecycle 36/36

Workstream 4 (Option A sequencing via loading_screen + SimBridge
connect) lands next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 00:25:10 +02:00
jpmschweitzerandClaude Opus 4.6 f24d08f756 refactor(ui): migrate 6 meta screens to MetaScreen pattern (Workstream 2)
Relocates main_menu, character_creation, settings_dialog, debug_console,
bug_report_dialog, loading_screen from flat client/ui/ into structured
client/ui/meta/screens/<name>/. All six now extend MetaScreen instead
of Control; the base handles open/close lifecycle, visibility,
captures_input, and — for overlays — the sim-pause contract.

Screen policies set per Tyre's proposal:
- settings_dialog: pauses_sim=false, PUSHES onto MetaStack
- debug_console: pauses_sim=true, PUSHES (D-088 routing via base)
- bug_report_dialog: pauses_sim=true, PUSHES
- loading_screen: closable_by_escape=false, PUSHES
- main_menu, character_creation: scene-roots, extend MetaScreen for
  the lifecycle contract only, do NOT push onto the stack

character_creation stays at its current surface (tabs, descriptor,
creation_confirmed signal unchanged). Tab consolidation and
CharacterProfile migration happen in Workstreams 5 and 6.

Knock-on changes:
- main.tscn ModalLayer CanvasLayer renamed to MetaLayer; main.gd
  @onready refs updated; constants.gd comment updated; test_client_p3
  and test_ui_framework_sprint15 assertions updated; test_monologue_display
  and .tscn header comments updated.
- OPEN_MENU handler now pushes settings_dialog onto MetaStack before
  calling open(). Full ESC priority chain lands in Workstream 4.
- atlas_app.gd: _unhandled_key_input signature widened from
  InputEventKey to InputEvent with an is-check, per Godot 4 API. Pre-
  existing narrowing was silently tolerated until main.tscn started
  fully instantiating under the new pattern.
- test_client_p3: entity_renderer type annotations corrected from
  ColorRect to Sprite2D (stale since a prior refactor); facing
  indicator rotation assertion switched to angle_difference() for
  modular-safe comparison.

Verification:
- gdlint client/scripts/ client/ui/ — zero problems
- godot --headless --path client --quit — no SCRIPT ERROR
- test_client_p3: 24/24 pass
- test_ui_framework_sprint15: 54/54 pass
- test_implant_nav_stack: 52/52 pass
- test_implant_registry: 42/42 pass
- test_implant_app_lifecycle: 36/36 pass

Workstream 1 foundation (84105916) remains unchanged. Workstreams 3-8
follow: protocol layer, Option A sequencing, 3-tab restructure,
Bookmark tab, location picker, Skills stub.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 21:58:24 +02:00
jpmschweitzerandClaude Opus 4.6 84105916cd feat(ui): introduce MetaScreen pattern foundation (#618, #680)
Establishes the faux-game-menu base pattern for non-diegetic UI,
analogous to ImplantApp but for pre-gameplay and meta-overlay
screens (main menu, character creation, settings, debug console,
bug report, loading screen). Workstream 1 of the MetaScreen
refactor — foundation only, no screen migrations yet.

- client/ui/meta/meta_screen.gd: base class (Control) with
  HIDDEN/OPENING/OPEN/CLOSING phase tracking, three orthogonal
  policy booleans (pauses_sim, closable_by_escape, captures_input),
  open/close lifecycle, on_escape contract, closed + escape_pressed
  signals, subclass hooks (on_open, on_close).
- client/ui/meta/meta_stack.gd: autoload coordinator. Overlay stack
  with push/pop/top/is_active; handle_escape chain; sim-pause
  coordination via SimBridge when pauses_sim=true; meta_active_changed
  signal. All class references kept inside method bodies — no
  top-level class_name refs, matching HudGroups / GameState
  autoload parse-order discipline.
- client/scripts/character_profile.gd: Resource wrapping the
  visual descriptor with bookmark_id and start_location_id.
  Target of the creation_confirmed signal once the character
  creation flow migrates.
- client/project.godot: MetaStack registered as autoload after
  HudGroups, before ImplantRegistry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 20:18:29 +02:00
jpmschweitzer c3ff7040ae Merge remote-tracking branch 'origin/sprint-36/server'
# Conflicts:
#	server/data/systems.db
2026-04-19 18:45:06 +02:00
jpmschweitzerandClaude Opus 4.7 13530910c9 fix(server): PR #132 review round 2 — 14 actionable comments addressed
Blockers (4):
- Wire cargo deny check into pre-pr-server (was dead config) (#1)
- ConfirmBookmark idempotency guard: SimError ProtocolError on retry (#2)
- D-080 amendment: transfer_npc_knowledge retained-but-dormant honest doc (#3)
- SelectedBookmark v0.2 transient scope; save/load deferred to #863 (#4)

Issues (8):
- ConfirmBookmark validation tests: unknown id, invalid location,
  valid path, double-confirm guard (#5)
- snapshot_with_bookmark_catalog fixture for client #618 decode tests (#6)
- generate_brands: replace 5 raw .unwrap() with eprintln+exit pattern (#7)
- npc_knowledge_transfer.rs: stale run_npc_conversations refs cleaned (#8)
- monologue.rs: residual D-078 "overheard conversations" doc removed (#9)
- 5 test files: orphan blank lines from removed conversation_* fields (#10)
- BookmarkCatalog: add PartialEq, Eq derives (matches sibling) (#11)

Nits (2):
- culture_tag doc: describe BookmarkRegistry::build_catalog behavior,
  remove "until #679 lands" placeholder (#13)
- generate_brands seed=1 canonical comment (#14)

Follow-ups filed:
- #862 — BookmarkPlugin::new(registry) injection (#12 deferred)
- #863 — Wire SelectedBookmark into SaveState (Sprint 37)

Pre-pr-server: fmt clean, clippy clean, deny clean, build clean.
nextest save_io failures pre-existing parallelism issue (sequential
cargo test --lib passes 20/20).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:04:46 +02:00
jpmschweitzer 9c69f0bd9d Merge remote-tracking branch 'origin/sprint-36/copy' 2026-04-19 16:42:57 +02:00
jpmschweitzerandClaude Opus 4.7 6d9bb6eadd fix(content): PR #133 round 2 review — 3 remaining Miri items
- tooling/planet-gen/earth_blocklist.txt: document GJ0d (Earth body) as
  blocklist-exempt so Brussels (and other Earth-canonical city names) are
  not flagged on next sol_import.py run (R2 issue 1)
- wiki/star-systems/GJ-380/bodies/GJ380c/markers.json: rename Selet Basin
  → Subin Basin (Kumasi river namesake). Brings Akan register on GJ380c
  to 3/29 features distributed across river, mountain, lake — credible
  multi-generational trade corridor read instead of minimum-viable patch
  (R2 issue 2)
- server/data/systems.db: atlas_oceans resynced for GJ380c
- docs/atlas/hand-refine-log.md:119: corrected stale log entry — Aldren
  Pass was subsequently renamed Randalfoss to eliminate the cross-system
  Aldren stem collision with GJ380c (R2 nit 3)
- tooling/planet-gen/refine_log_849.md: Groombridge cross-corridor
  addendum updated to reflect 3/29 Akan register distribution

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 16:34:14 +02:00
jpmschweitzerandClaude Opus 4.7 98b2a9ed94 docs(content): refine log — Paula's Earth rebalance header entry
Parallel addition to the rebalance addendum already in the GJ 0 Sol
section — Paula's header-style entry at the summary level complements
the in-context detail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:52:00 +02:00