Skip to content

Round-3 negative-mode fixes (44 master items: core + FP-018 + web) - #86

Open
LlamaAdam wants to merge 4 commits into
masterfrom
claude/ollama-code-analysis-ak77i1
Open

Round-3 negative-mode fixes (44 master items: core + FP-018 + web)#86
LlamaAdam wants to merge 4 commits into
masterfrom
claude/ollama-code-analysis-ak77i1

Conversation

@LlamaAdam

@LlamaAdam LlamaAdam commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Engineering fixes from negative-mode round 3 — report: docs/ollama-analysis/NEGATIVE_MODE_ROUND3.md on LlamaAdam/mtga-advisor#5. All 44 FIX-MASTER items from the reconciled routing table are here; the 23 items routed to the other assistant's PRs are posted as reviews on #85 and #84, and the 3 owner decisions (R3-D1..D3) are in DECISIONS_FOR_REVIEW.md.

Core batch (C-01…C-14, S-1…S-4)

  • C-08 stable per-deck identity for decks without a Moxfield= line (every Archidekt-lane deck), so commander-history, verdict breakdowns, trajectories and the judge joins stop seeing one-row "decks"; dry-run-default backfill script for existing rows.
  • C-03 decision C1 now holds on compare()'s filler path (web A/B, commander-iterate, commander-compare, meta_test): [REF] / [CONTROL] / [PREMADE] pool decks are refused loudly.
  • C-01 / C-02 the two "could not decide" mislabels: sub-floor sims land as inconclusive (R2-D2 vocabulary); a confirmation sim that fails no longer rewrites a completed row to pending with fabricated zeros.
  • C-04 sim-time guard when two versions share Name=. C-05 / C-07 the R2-D5 era-boundary instructions work and compare times in one timezone. C-06 era fails closed on unparseable timestamps.
  • C-09 / C-10 verdict provenance on every writer, computed server-side. C-11 the web "40 (verdict floor)" option and its tooltip describe the same run. C-12 / C-13 / C-14 all-staple swap labeling, inconclusive==inconclusive not counted as agreement, one margin convention at zero decisive.
  • S-1…S-4 tribal word-boundary match, comment fix, schema_version guard, integer-only judge dimension scores.

FP-018 + web batch (F-01…F-18, W-01…W-10, W-12, W-13)

  • F-01 / F-03 / F-05 free-text intent finally has a production writer (the primer sidecar → Intent.stated; --preferences on judge / improve / adopt); the advisor bias is additive (never evicts the tribe page, never feeds cut-protection); free text is fenced in the judge prompt with a hashed delimiter and every JudgeReport carries a prompt_version that judge_agreement tallies separately.
  • F-02 / F-10 / F-16 one front-face match key on both sides of adopt's cross-check, Protect= matching and prose mentions — DFC card-links match the .dck again, curly-apostrophe Protect= lines pin, Opt stops matching option.
  • F-04 negation-aware, word-bounded preference keywords ("no tokens" no longer steers toward tokens; the real Baba Lysaga sentence is pinned).
  • F-06 the Moxfield lane writes the primer sidecar too. F-07 / F-08 sidecar identity header (source id + content hash) with honest written / refreshed / unchanged / refused semantics; readers refuse another deck's sidecar; deleting a deck removes its sidecar.
  • F-09 unresolved cards are never proposed as cuts and the "never touch lands" line prints only when true. F-11…F-15, F-18 grounding, word-bounded heading-aware win-line quoting, load-bearing "rebuild unreachable" tests, non-Delta JSON refused, machine-block escaping, loud Game Changers fallback, card counts.
  • W-01 … W-10, W-12 deck_source id validation (no raw string into [metadata]), same-origin gate on side-effecting GETs, one .dck reader that handles a BOM and cp1252 without a library-wide 500, unified filename sanitizer + request body cap, upstream id validation, deck_dir validation, atomic owner-only config write, atomic writes on every deck writer (new atomic_io), CRLF-preserving GET→PUT, desktop test no longer takes the real instance lock.
  • W-13 Playwright spec for the SSE audit stream; smoke lane runs on master pushes and on dashboard-payload module changes. F-17 capture lane validates per-site:.

Deliberately not done (recorded in the batch reports): re-threading historical auto-curate parent_id (would be guessed lineage); the bracket-drift rename leaving the old sidecar behind (cosmetic; readers refuse it by header); chmod of a pre-existing config parent directory.

Tests

Core batch final re-run 666 passed; FP-018/judge/import/config/desktop 347 passed; per-file moxfield_import / dck_meta / cli / deck_builder / staples / snapshot / game_changers / edhrec 540 passed; test_web_app + test_deck_dashboard + test_improve 533 passed. Every fix carries a regression test that fails without it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mdg9HA1ZkdKQ3wpZvra3ou

…ixes

Negative-mode round 3 (mtga-advisor docs/ollama-analysis/
NEGATIVE_MODE_ROUND3.md) engineering fixes, core batch:
- C-08 stable per-deck identity for decks without a Moxfield= line,
  with a dry-run-default backfill script for existing rows
- C-03 decision C1 on compare()'s filler path: [REF]/[CONTROL]/
  [PREMADE] pool decks refused loudly
- C-01 sub-floor sims labeled inconclusive (R2-D2 vocabulary), not
  neutral; C-02 a confirm sim that fails no longer rewrites the row to
  pending with fabricated zeros (R2-D3's own case)
- C-04 sim-time guard for two versions sharing Name=; C-05/C-07 the
  era-boundary instructions now work and compare times in one zone;
  C-06 fail-closed era on unparseable timestamps
- C-09/C-10 provenance on every verdict writer, computed server-side;
  C-11 web verdict-floor option and tooltip agree; C-12/C-13/C-14 swap
  labeling, agreement counting, and one margin convention
- S-1..S-4 tribal word boundary, comment, schema_version guard,
  integer-only dimension scores
- F-17 capture lane validates per-site:; W-13 smoke lane runs on master
  pushes and on dashboard-payload module changes

Core suites: 666 passed on the final re-run; test_web_app not yet
re-run on this batch (CI will).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mdg9HA1ZkdKQ3wpZvra3ou
The web suite still pinned the old literal-0 margin for a sim with no
decisive games; C-14 made every writer omit it (NULL) -- an absence,
not an observed tie. Only this assertion was stale; CI's other 4,483
tests passed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mdg9HA1ZkdKQ3wpZvra3ou
Negative-mode round 3 engineering fixes, second batch:
- F-01/F-03/F-05 free-text intent has a production writer (sidecar ->
  Intent.stated; --preferences on judge/improve/adopt), the advisor
  bias is additive (never evicts the tribe page, never feeds
  cut-protection), and free text is fenced in the judge prompt with a
  hashed delimiter plus a JudgeReport.prompt_version stamp that
  judge_agreement tallies per version
- F-02/F-10/F-16 one front-face match key on both sides of adopt's
  cross-check, Protect= matching and prose mentions (DFC embeds match
  the .dck; curly apostrophes pin; Opt no longer matches option)
- F-04 negation-aware, word-bounded preference keywords
- F-06 the Moxfield lane writes the primer sidecar too
- F-07/F-08 sidecar identity header (source id + hash), honest
  written/refreshed/unchanged/refused semantics, readers refuse a
  sidecar that names another deck; deck deletion removes its sidecar
- F-09 unresolved cards are never proposed as cuts; the lands promise
  is printed only when true; the init decline text is honest
- F-11..F-15, F-18 grounding, word-bounded heading-aware win lines,
  load-bearing rebuild-unreachable tests, non-Delta JSON refused,
  machine-block escaping, loud Game Changers fallback, card counts
- W-01..W-10, W-12 deck_source id validation, same-origin gate on
  side-effecting GETs, one .dck reader (BOM, cp1252), unified filename
  sanitizer + body cap, upstream id validation, deck_dir validation,
  atomic owner-only config, atomic writers everywhere (new atomic_io),
  CRLF-preserving round trip, desktop test never takes the real lock
- W-13 Playwright spec for the SSE audit stream

Suites: FP-018/judge/import/config/desktop 347 passed; per-file
moxfield_import/dck_meta/cli/deck_builder/staples/snapshot/
game_changers/edhrec 540 passed; test_web_app + deck_dashboard +
improve 533 passed after one new test learned the JSON mutation gate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mdg9HA1ZkdKQ3wpZvra3ou
@LlamaAdam LlamaAdam changed the title Round-3 negative-mode fixes (core batch; FP-018/web batch pending) Round-3 negative-mode fixes (44 master items: core + FP-018 + web) Sep 3, 2026
- deck_dir picker test pinned a literal C:\my\decks; W-07's validator
  now requires an existing absolute directory on this machine, so the
  pin uses a real tmp directory (rejections are tested in
  test_config_store).
- auto-curate batch records kept only the HEAD of a truncated stderr;
  argparse prints the identifying 'error: unrecognized arguments' line
  LAST, and the round-3 flags pushed usage past the cap. Keep head and
  tail.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mdg9HA1ZkdKQ3wpZvra3ou
@LlamaAdam
LlamaAdam marked this pull request as ready for review September 3, 2026 23:56
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