Skip to content

Atlas /atlas full catch-up — gates + settled tournament + first-run UX (868 tests green)#23

Merged
anombyte93 merged 77 commits into
mainfrom
reconcile/atlas-catchup
Jun 17, 2026
Merged

Atlas /atlas full catch-up — gates + settled tournament + first-run UX (868 tests green)#23
anombyte93 merged 77 commits into
mainfrom
reconcile/atlas-catchup

Conversation

@anombyte93

Copy link
Copy Markdown
Owner

Atlas /atlas full catch-up — gates + settled tournament + maintenance + first-run UX

Consolidates the local engine work that had diverged from the live /atlas branch into one reviewed change. Built and reconciled locally green first: python3 -m pytest -q868 passed, 5 skipped.

What lands (4 streams, merged in conflict-ascending order, suite gated green after each)

  • The unfakable "done" gates (via feat/tournament-orchestrator, which stacks them):
  • The settled-tournament marketplace — N executors race one job → each adjudicated through BOTH gates → winner-take-all in AtlasCoin → honest losers refunded → proven fakery shadow-logged → a trusted reputation store (UCB router, cold-start open) routes future jobs. Pure settlement core + AC-conserving 3-bucket bank + atlas tournament settle|verify CLI (companion atlas-protocol#3) + the Python orchestrator (spawn/anti-sybil, commit-reveal collector, adjudicator, goose/OpenRouter cheap racer, reputation). Proven end-to-end by a real-podman e2e: a reward-hacker (self-claims pass, oracle says FAIL exitCode=1) is caught and shadow-slashed; the genuine winner is paid; AC conserved; reputation routes.
  • First-run UX (dogfood of /atlas on itself) — confirms-intent/plan-mode gate (/atlas: intent not captured up front (no plan-mode-style confirm) + interactive clarification is Claude-AskUserQuestion-only (no Codex/Gemini/other harness) #20), structured-choice handoff gate, harness-adaptive gate wording, the configure no-op fixed (returns a structured deferred instead of silent null), and a deterministic zero-AI expand structural fallback so "structural decomposition alone" is real.
  • Maintenance — npm-auth preflight, v4-maintenance, main.

Reviewed

Built via subagent-driven-development with two-stage review, then a headless live-evidence walkthrough audit (one independent auditor per surface, live test/CLI/e2e as evidence) that caught real operational holes build-time review missed — two blocking CLI defects (empty-stdout on bad job dir; paid-but-unmarked crash window), a stale-lock permanent block, a tz crash, and a non-discriminating capstone e2e (the "reward-hacker" was failing for an infra reason). All fixed with a Second-Check (fresh re-run proving the exact defect gone + full-suite regression). Decision trail in .i-walkthroughs/entries/slice2a-tournament-audit.md.

Deliberately excluded

fleet-monetization-integration — its Python merged cleanly (the 32-tool MCP contract, renderers, shipcheck telemetry) but it makes task-master-ai a hard peer dependency, contradicting this tree's decision to make it optional (commit de188ed); both ship tests asserting the opposite, so it's a product decision, not a merge. Re-mergeable once the installer philosophy is chosen.

Notes

  • Shadow-slashing only (no AC burned); real slashing + an independent watcher are deferred.
  • One pre-existing flaky test (test_validate_setup, a 5s subprocess timeout under full-suite load) is unrelated to this change.

🤖 Generated with Claude Code

claude and others added 30 commits June 13, 2026 08:59
…p local-machine paths

setup SKILL.md referenced the developer machine's plugin checkout for the
customizations starter pack and ship-check.py scaffold, so first-run setup
failed on every external install. Both now resolve from the packaged skel/
directory; the ship-check copy gains an existence guard so an unset
CLAUDE_PLUGIN_ROOT degrades to a no-op instead of a hard cp error.
execute-task prose pointer updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit f5df447)
… test

npm 11 ignores the root .npmignore inside files[]-allowlisted directories,
so 24 __pycache__/*.pyc entries were shipping in the tarball. Per-dir
.npmignore files in mcp-server/ and prd_taskmaster/ do the real filtering;
the root file documents the trap defensively. New test asserts the
npm pack --dry-run manifest stays free of bytecode and marketplace.json.

Imported-From: prd-taskmaster-plugin@v5-final (f140490)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 82ac1b0)
Same repair as main's 8533244, isolated from the identity changes so the
v4.0.0 tag tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…setup layer

Sub-project #1 of removing the task-master dependency: a 3-tier hybrid
provider resolver (keyless CLI-agent -> raw-key API -> agent-plan), the
net-new cli_agent.py, an engine config block, and a setup wizard.

Spec + plan both independently reviewed (code citations verified).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chunk 1 of the Atlas hybrid provider + setup layer. Pure parsing/defaults:
engine.provider_mode / keyless_default / cli_agent / concurrency, all
defaulted, malformed values fall back silently like load_fleet_config.
No behavior yet — resolver/cli_agent land in later chunks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
load_fleet_config now always returns a fully-defaulted cfg["engine"], merged
from .atlas-ai/fleet.json via engine_config(). Every return path (no file,
malformed, valid) carries a valid engine key so downstream chunks can read
cfg["engine"] unconditionally. Existing fleet-config tests unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rc match

Addresses code-review I1/M1/M2 on the npm-auth preflight (#3):
- I1: a naive file://${argv[1]} guard silently skipped main() (and the whole
  auth check) when the install path had spaces or was symlinked — a publish could
  proceed with NO auth check. Use pathToFileURL(argv[1]).href.
- M1: repurpose the previously-unused node:url import.
- M2: anchor the npmrc token match with startsWith so a crafted host segment
  can't false-pass.
Adds an I1 regression test (script run from a path with spaces still exits 1).
Verified: node --test 10/10; no-token + spaces-path both exit 1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New keyless CLI-agent module skeleton: error shape with .kind, argv/stdin
builder for claude/codex/gemini, native-cli telemetry helper. Schema path
(claude --json-schema) vs prompt path selection. subprocess fully mocked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e stdout error detail

Fix #1: claude --output-format json --json-schema still returns prose in .result
unless the prompt also carries a JSON-only directive. Drop the `not use_schema_flag`
gate so the directive is always folded in for all providers (belt-and-suspenders).

Fix #2: on nonzero exit, claude writes the real error in a JSON envelope on stdout
(is_error/result/api_error_status) while stderr may hold only benign warnings.
Add _claude_error_detail() that parses the envelope and surfaces the stdout reason;
falls back to stderr then stdout. Use _has_schema_flag() instead of inline str check.

Add two regression tests locking both fixes. 386 passed, 0 failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
_probe_spawn_cached(provider, ttl_s): module-level dict keyed by provider,
time.monotonic TTL, True cached for ttl_s, False never cached so a transient
nested-spawn refusal re-probes instead of pinning off the free path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New prd_taskmaster/provider_resolver.py. frozen ProviderHandle(kind/provider/
role/model/reason). resolve_provider consults engine_config + _read_taskmaster_
model + _provider_usable + _probe_spawn_cached + discover_key; plan floor always.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers: api_only ignores usable CLI; api_only+no-key -> plan; cli_only ignores
key; cli_only+refused -> plan; hybrid spawn-refused demotes to api (gh#11);
non-spawning role provider skips CLI tier; unusable CLI demotes to api.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e assert

Add test_ttl_boundary_exact_expires to prove strict < in _probe_spawn_cached
expires the entry at elapsed==ttl_s (kills <= mutant). Replace the always-true
"spawn not in reason or kind==api" guard with a real API-tier reason assertion.
Add op_class reserved-for-Chunk-4 comment in resolve_provider.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chunk 4 Task 4.1. parse_prd now resolves role "main" and dispatches on the
handle: plan -> parse floor, cli -> cli_agent.generate_json_via_cli (demoting
CliAgentError to the floor), api -> existing llm_client.generate_json path
(byte-identical). Adds _cli_timeout/_cli_structured_mode reading the shared
engine.cli_agent config + imports cli_agent and resolve_provider.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r fan-out

Chunk 4 Task 4.2. expand() resolves role "main" ONCE and threads the handle +
config into each _expand_packet worker, so N keyless `claude -p` children run
concurrently inside the unchanged ThreadPoolExecutor. _expand_packet gains a
cli short-circuit (one call, no api tier-escalation ladder; CliAgentError ->
failed packet). plan-kind returns the expand floor; result "ai" now reflects
handle.kind. The api path (escalation ladder) is byte-identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chunk 4 Task 4.3. rate() resolves role "main" and dispatches: plan -> rate
floor, cli -> cli_agent.generate_json_via_cli (CliAgentError demotes to floor),
api -> existing llm_client.generate_json (unchanged). Report write + result
"ai" now reflects the resolved kind.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dependence

Chunk 4 Task 4.4. test_no_key_operations_return_agent_action_required pins
resolve_provider -> plan so the no-key->floor intent holds regardless of whether
a claude/codex/gemini CLI is installed on the host running the suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…an_only

Contract item 8: the keyless hybrid engine no longer depends on the task-master
binary, so its presence/version is advisory (excluded from critical_failures)
when provider_mode != plan_only. plan_only keeps the hard gate. validate_setup
gains a provider_mode param (default read from fleet.engine_config()).

Two legacy capabilities tests updated for the new advisory behavior:
- fails_without_binary now pins provider_mode=plan_only to assert the hard gate
  it was written for (binary fix present, ready False).
- critical_failures_count filter now excludes 'advisory' too, mirroring the
  impl's definition of critical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
run_setup() reuses run_detect_providers + detect_capabilities to render a
per-role recommendation panel with reasons. Non-interactive scaffold; accept/
add-key/validate land next.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
--yes runs configure-providers + validate non-interactively (no input()).
--validate runs validate_setup PLUS a live claude -p / codex --version probe
per chosen provider, demoting `ready` on a real 401/ENOENT before the pipeline.
The Task-2 panel test now stubs configure/live-probe since the accept path went
live (no behavior change to the panel under test).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…efault

When a key is added AND a spawning CLI exists, the wizard asks once
(keyless-free vs paid-key as primary) and persists engine.keyless_default via
fleet.save_engine_config. No CLI → no question, flag stays null (no global
default). run_setup gains an injectable `choose` callback for the interactive
branch so it stays test-safe.

Adds fleet.save_engine_config(updates) — the atomic engine-block persister the
Chunk-5 contract depends on. Chunk 1 landed engine_config() but not the
persister; this fills that contract gap (engine block deep-merged, siblings and
all other top-level fleet.json keys preserved). Tests read the persisted value
back via engine_config(load_fleet_config()) since Chunk 1's no-arg
engine_config() returns pure defaults (does not read the file).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cmd_setup drives run_setup and exits non-zero when validation is not ready so
CI/dispatch can gate on `atlas setup --validate`. Subparser + DISPATCH follow
cli.py conventions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move mid-file `import json` / `import sys` in setup_wizard.py to the
top stdlib import block. Soften fleet.save_engine_config docstring to
clarify the persisted value is not pre-validated (engine_config corrects
on read). Soften mode_recommend.validate_setup docstring to state that
the no-arg default resolves to the engine default ("hybrid") via
engine_config(), not from the persisted fleet.json; callers needing the
persisted mode must pass it explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ackend='taskmaster'

auto no longer probes for the task-master binary — native is the sole
generator (spec §9.2). backend='taskmaster' still works for one release
behind a DeprecationWarning. Updated test_backend_factory_precedence_and_auto_detection
to expect auto->native. TaskMasterBackend class deletion is gated on golden
parity (Task 4).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Normalizer reduces a task graph to its structural shape (drops volatile
prose); differ gates on a pre-declared intended-diff whitelist (skill:
AI-golden-parity-refactor). Capture reads the graph from DISK
(.taskmaster/tasks/tasks.json via parallel.load_tagged/get_tasks) because
parse_prd returns {ok, task_count} with no 'tasks' key; each backend leg runs
in its own temp cwd+tag. A unit test feeds a realistic parse_prd-shaped result
dict through the extractor to catch the disk-vs-result bug in CI. capture/gate
CLI subcommands feed the deletion gate (Task 3). No production code touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Companion to the get_backend('auto')->NativeBackend flip (spec §9.2): the
engine preflight derives selected = get_backend(cfg).name, so with the
task-master binary present it now reports selected='native' (binary still
detected/available, just not selected) and ai_ops='agent'. Renamed the test
from ..._reports_auto_taskmaster_backend to ..._reports_auto_native_even_with_taskmaster_binary
and updated its assertions. No production code change — the flip drove this.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…te task_count

batch.py: replace get_backend({"backend":"taskmaster"}) with
TaskMasterBackend(_FACTORY_TOKEN).detect() directly so the internal
binary-availability diagnostic does not trigger the user-facing
DeprecationWarning on every preflight run.

golden_parity.py: diff_graphs now fails immediately with a clear reason
("empty graph — capture produced no tasks") if either graph has
task_count < 1, preventing empty-vs-empty from silently passing the gate.
Three new unit tests cover empty-vs-empty, empty-gold, and empty-new.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…chnical <tokens>

The angle-bracket placeholder sub-pattern `<[A-Z][A-Z_ ]+>` was compiled with
`re.IGNORECASE` in `run_validate_tasks`, causing legitimate technical tokens like
`<code>`, `<lines>`, `<bytes>`, `<filename>`, `<id>`, `<file>` to be flagged as
template placeholders. This caused valid generated task graphs to fail validation,
producing 0 tasks for users whose PRDs mention URL path params or format specifiers.

Fix: extract a shared module-level constant `_ANGLE_BRACKET_PLACEHOLDER` using the
tighter pattern `<[A-Z][A-Z0-9_]{2,}>` (uppercase-only, minimum 3 chars inside
brackets, no re.IGNORECASE). Applied to both `run_validate_prd` and
`run_validate_tasks`. True placeholders like `<PLACEHOLDER>`, `<API_KEY>`,
`<YOUR_VALUE>` are still caught; lowercase tokens are not.

13 new regression tests added in TestAngleBracketPlaceholderRegex (5 prove the
bug pre-fix; all 13 pass post-fix; full 454-test suite green).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude and others added 25 commits June 16, 2026 20:19
…lity gate (wired/live require WIRED/EXEMPT verdict)

- run_set_status gains evidence_ref + reachability params (signature backward-compatible: tag/non-done paths unchanged)
- wired/live tasks marked done without a WIRED/EXEMPT reachability dict now raise CommandError (fail-closed gate)
- ORPHAN/ERROR/unknown/absent verdicts all block; domain-model/spike/untiered tasks keep bare flip
- doneEvidence (evidence_ref + timestamp) and reachability dict persisted additively on the task object when provided
- set_task_status MCP wrapper passes both new params through
- 16 new TDD tests green; full suite 517 passed 3 skipped
…uto-reads it; execute-task sweeps + auto-downgrades orphans

- Part A: new `prd-taskmaster reachability-sweep --task <id> --start-commit <sha>`
  subcommand (prd_taskmaster/reachability_cmd.py + cli.py wiring).
  Loads task, runs sweep_task(), writes verdict dict into .atlas-ai/cdd/task-<id>.json
  under "reachability" key (atomic, additive). exit 0 for WIRED/EXEMPT, exit 1 for ORPHAN/ERROR.

- Part B: `set-status` gains --evidence-ref and --reachability flags.
  Auto-read fallback in run_set_status(): when marking done with no explicit
  reachability, reads the verdict from the CDD card — so Step 9b sweep → Step 10
  mark-done works without extra flags. ORPHAN/ERROR from auto-read still blocks
  (RA5 gate preserved). Untiered/domain-model tasks unchanged.

- Part C: execute-task/SKILL.md updated — documents task_start_sha capture,
  Step 9b reachability sweep (mandatory for wired/live), and Step 10 branching:
  WIRED/EXEMPT → done, ORPHAN/ERROR → auto-downgrade to scaffold + continue loop.
  Throughline: "a green test on a module imported by nothing is not done — wire it
  or it ships as scaffold."

- 27 new tests in tests/core/test_reachability_sweep_cmd.py; full suite 544 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t); scaffold blocks ship gate

- Add "scaffold" to VALID_STATUSES in task_state.py so set-status --status scaffold no
  longer raises "unknown status" (the auto-downgrade path in execute-task Step 10 now works).
- scaffold is NOT done, NOT deferred — a deliberate incomplete state for orphan modules;
  Gate 2 (gate_tasks requires every task done) already blocks any scaffold task from SHIP_CHECK_OK.
- Count scaffold tasks in _count_tasks and surface them in execute_panel with a ⚠ line
  ("N scaffolded — orphan, blocks ship gate") for honest operator visibility.
- Tests: set-status scaffold succeeds (API + CLI); scaffold task verified to block run_all_gates;
  VALID_STATUSES membership assertion; pipeline_state tag_counts dict updated for scaffold key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s, scaffold honest; orthogonal to oracle

Adds 11 genuine end-to-end tests spanning the full reachability lifecycle:
real git repo, real reachability-sweep CLI, real ship-check subprocess, fake
oracle stub via ATLAS_ORACLE_CMD so Gate 5 passes and Gate 6 is the deciding
gate.

Scenarios covered:
- A: orphan module → sweep writes ORPHAN → ship-check exits 1, stderr names
  ORPHAN + task id (non-vacuous acceptance criterion)
- B: oracle/test orthogonality — task's own test passes (oracle PASS) while
  reachability is ORPHAN, proving the two axes are independent (the user's
  exact bug: 10 of 19 'done' tasks were orphan dead code)
- C: wire module (edit existing app.py to import Widget) → re-sweep writes
  WIRED → set-status done auto-reads it → ship-check prints SHIP_CHECK_OK
- D: set-status scaffold → Gate 2 blocks honestly (not Gate 6), proving the
  scaffold path is an honest "not done" exit

Bug fixed during e2e development (uncovered by real sweep): gate_reachability
in skel/ship-check.py joined modules with ', '.join() but sweep_task writes
module dicts, not strings — fixed to extract m["module"] from each dict entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… skel/.npmignore (pyc excluded from pack)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… (close JS/TS false-WIRED)

Extend _EXCLUDE_NAME_RE to match *.spec.<ext> and *.cy.<ext> for all
supported language extensions (py/ts/js/jsx/tsx/go/cjs/mjs).  This
prevents co-located Jest/Vitest/Angular spec files and Cypress .cy files
from being counted as production importers in find_importers, and from
being swept as new modules in new_modules_for_task.  Without this fix a
module imported only by src/bar.spec.ts would return WIRED (false pass).

Also aligns the find_importers grep globs to include *.cjs alongside
the existing *.mjs so a .cjs-only importer is detected correctly.

Five new regression tests added in TestSpecCyImporterIsOrphan confirming:
- bar.spec.ts sole importer → ORPHAN (was WIRED pre-fix)
- bar.cy.ts sole importer → ORPHAN (was WIRED pre-fix)
- bar.cy.js sole importer → ORPHAN (was WIRED pre-fix)
- spec + real production importer → still WIRED
- new foo.spec.ts excluded from new_modules_for_task

Full suite: 568 passed, 3 skipped, 0 failures.
…n, emit submissions.json, shell atlas tournament settle (fail-closed)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…osed containment + mkdir evidence dirs + sanitize claimant path (review B1/B2/I1/I2/I3)

B1: settle_job now passes timeout= to subprocess.run (default 120s, overridable via
ATLAS_TOURNAMENT_TIMEOUT_S). Catches subprocess.TimeoutExpired → raises ValueError
("timed out after Xs") alongside existing OSError/SubprocessError.

B2: entry_fee_paid and fakery_stake use safe coercion
(_int_or_none(racer.get(...)) or 0) so any non-int/None/missing value yields 0
instead of a bare int() TypeError that would abort the whole job.

I1: adjudicate_job wraps each adjudicate_submission call in try/except. On ANY
unexpected exception (KeyError on malformed racer, etc.) inserts a fail-closed
Submission with oracle.verdict="ERROR" and reachability.verdict="ERROR" (ensuring
passesBothGates=false on the TS side) instead of crashing the job.

I2: adjudicate_submission now calls mkdir(parents=True, exist_ok=True) on both
evidence_dir and ledger_dir before invoking _grade, preventing spurious FAIL on
every e2e run when those dirs don't pre-exist.

I3: claimant_id is sanitized (Path.name + strip ".." + strip slashes) before use
as a filesystem path component. The ORIGINAL claimant_id is preserved verbatim in
Submission.claimant.id for settlement identity.

M1: removed dead first settle_job call in T6.
New tests: T9 (timeout raises), T10 (bad fee coercion→0), T11 (malformed racer
fail-closed), T12 (OSError raises), T13 (dirs created before oracle), T14 (path
traversal sanitized, original id preserved).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/S=5E), injectable launcher adapter, fail-isolated spawns

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…oster rollback on partial admit; TTL sweep for crashed jobs; dup-model guard; concurrency test (review B1/B2/I1-I4)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cer, reputation store+UCB router

Built in parallel via adversarial-verify workflow (2 review lenses/module, all APPROVED):
- collect.py: anti diff-copy hash verification, quality-gated window (injectable clock, no hang), fail-closed
- goose_backend.py: OpenRouter cheap racer, key from env only (no hardcoded secret), fail-closed
- reputation.py: TRUSTED store fed by TournamentResult.winner (not self-report) + UCB router (cold-start open)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…udicate→settle→reputation, fail-closed, slots released in finally

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ry) + guarded slot release + empty-models/zero-racer short-circuits + slash-data preserved (review B1/B2/I1-I3,M2)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ettle, winner paid, fakery shadow-logged, AC conserved, reputation routes (skips cleanly without infra)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… + in-contract FAIL verdict + finite/non-neg settled_cost + accurate reputation/stage flags (walkthrough audit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dogfood friction #9: GENERATE.md and validate_setup both claim expand
'degrades to a structural pass' when no research/AI provider is reachable,
but every native/agent expand path requires a provider and otherwise only
returns agent_action_required. There was no code behind the claim.

Add run_expand_structural / _structural_subtasks (tasks.py) + an
'expand-structural' CLI command: decomposes under-expanded tasks into
verifiable subtasks with NO model/network call, sourced from the task's own
detail bullets and falling back to lifecycle-phase checkpoints. Guarantees
every task gets >= 2 subtasks fully offline/headless, satisfying the GENERATE
gate. Idempotent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Dogfood friction #5: engine_preflight(configure=True) on a fresh project
returned providers_configured=None silently — read as a no-op. Now returns an
explicit structured 'deferred' status (no mutation of the bare dir) and surfaces
it in the human summary ('Providers: configuration deferred...').

Dogfood friction #4: the 'Backend: native (api: openai)' summary line, shown
next to 'Provider: claude-code', read as a contradiction. Relabel it
'Backend: native (structured-gen via <provider> API)' to distinguish the
parse/expand path from the execution provider. (The gate itself IS already
credential-aware via discover_key — friction #4 was presentational, not a
missing check.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ward-hacker (oracle exitCode=1, not infra-fail); assert bounty actually credited (>=60); strict ledger-verify (walkthrough audit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chup

Canonical npm-auth preflight fix. Landed first so later npm-auth
conflicts resolve toward this version.
# Conflicts:
#	tests/plugin/test_skill_files.py
npm-auth conflicts resolved toward fix/prd-taskmaster-npm-auth-preflight canonical.
Brings atlas-coin-oracle-gate-cutover + reachability-gate + tournament
orchestrator (stacked). cli.py/validation.py keep union of both sides;
check-npm-auth.* resolve toward preflight canonical.

# Conflicts:
#	prd_taskmaster/cli.py
#	prd_taskmaster/validation.py
…rnament (2 blocking + 5 important fixed, Second-Checked)
…lap) + server.py tool count 31→32 (atlas-review findings F1/F2)
… + wire report_to in run_tournament + doc/test staleness (override flag, tm-parallel table, 32-tool count) [/code-review PR#23]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anombyte93

Copy link
Copy Markdown
Owner Author

Code review (/code-review) — 5 parallel reviewers, confidence-scored

Reviewed the reconciliation (CLAUDE.md adherence · bug scan · git-history · prior-PR comments · code-comment compliance). Net: 2 real correctness bugs + 3 doc/test staleness items found and fixed; 1 false positive rejected; 2 minors noted. No regression against the task-master-optional / tm_parallel-removal decision (de188ed) — verified absent.

Fixed (confidence ≥ 75)

  • Goose↔collector diff-hash mismatch (tournament/goose_backend.py vs collect.py, conf 75) — goose hashed text=True-decoded+re-encoded stdout while the collector hashes raw bytes → on any non-UTF-8/CRLF diff the anti-diff-copy gate would permanently reject every goose racer (hash_mismatch). Fixed: goose now delegates to collect._compute_diff_hash (single source of truth, byte-identical by construction). Tests added incl. a non-ASCII diff.
  • run_tournament didn't pass report_to (tournament/cmd.py, conf 75) — racer prompts read "report to inbox (empty)" while the collector listened on orchestrator_session → live tournament racers had nowhere to deliver. Fixed: report_to=orchestrator_session wired; test asserts the inbox is in every racer prompt.

Fixed (doc/test staleness, conf 50)

  • tests/mcp/test_mcp_tools.py — renamed test_server_registers_31_tools_32_tools, added render_status, len==32 (was a subset-assert masking the real count).
  • skills/execute-task/SKILL.md — removed three references to the deleted --override SHIP_CHECK_OVERRIDE_ADMIN flag (an agent would have passed a nonexistent flag); Gate 5 is the unfakable oracle, no override path.
  • root SKILL.md — removed the tm-parallel backend-ops row/prose (module deleted in de188ed); per CLAUDE.md "fix docs to match code".

Rejected (false positive)

  • "unlocks the TaskMaster backend removed from setup/SKILL.md" — the string is present and test_skill_files.py passes 32/32.

Noted (minor, not blocking)

  • antisybil.admit's result={} nonlocal pattern would surface a confusing KeyError (not a fail-closed default) if locked_update raises an I/O fault mid-call — restructure later.
  • run_enrich_tasks already_enriched counter under-reports by the number of tier-backfilled tasks (reporting only; the file write is correct).

Suite after fixes: 872 passed, 5 skipped. The 4 e2e gates (oracle dogfood + tournament) were additionally run with the real oracle CLI under podman → 4 passed, so the highest-risk merged surfaces are proven, not merely skipped.

🤖 /code-review — 5× Sonnet reviewers + per-issue confidence scoring

@anombyte93
anombyte93 merged commit 2067d9e into main Jun 17, 2026
7 checks passed
@anombyte93
anombyte93 deleted the reconcile/atlas-catchup branch June 17, 2026 07:06
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