No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router!108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "program/m06-m10-final-wave"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Program wave: M06 Codex Stage 2 (#91) + M10 distribution & acceptance (#95)
One integration PR for the final execution-program wave. Base:
4df6099(currentdevelophead at branch time). Left open for human review; not merged by any agent.Workstream A — M06 Codex execution adapter (issue #91, Stage 2)
scarcity_router/worker_codex_adapter.py:CodexLocalAdapter(idcodex) implementing the M05LocalAdapterprotocol; server side unchanged (worker_bridged+local_adapter_id, D-049).initialize/account/read/model/list/thread/start/thread/inject_items/turn/start/turn/interrupt— enforced by a load-bearing wire-method allowlist test); experimental API never enabled; forbidden surfaces never sent.--codex-bin→ PATH → U-001 extension layout; Desktop bundles never discovered (Stage-1 UNKNOWN).codex-cli >= 0.154.0(evidenced generation), fail-closed; strict bounded JSONL parsing (line/byte/event/depth/unknown-notification budgets).account/readtyped verdict requiringchatgpt; the adapter performs no provider-state mutation (D-018 stays collector-only, unamended — this was the one review blocker, resolved by removal, not by decision amendment); API-key never silently converts to PAYG; stale auth →auth_unverifiedwith officialcodex loginremediation.0o700controlledCODEX_HOMEwith minimal generated config; per-turnworkspaceWritesandbox (writableRoots=[scratch], network off, approvals declined,approvalPolicy: never); ephemeral threads; minimal constructed env; scratch dirs under the worker state dir.model/listbefore execution; clienttool_callsand unevidenced parameters rejected before execution (fail closed); boundedturn/interruptcancellation; crash-before-start → permanent, loss-after-start → ambiguous (never retried); honest usage mapping.Workstream B — M10 distribution, installation, update and acceptance (issue #95, M10-A + M10-B)
uv tool install scarcity-routerpath; newscarcity-router-workerconsole script (frozen three untouched); systemd user service example;package-checkverifies all 4 entry points.0o700data volume, healthcheck, secure defaults, single process — built and live-verified (health, 401s, TLS right/wrong-CA, restart persistence, non-loopback-without-TLS refused);examples/docker-compose.yml.*.specgitignore swallow was a review blocker, fixed with a negation rule and proven via clean-archive test runs) + minimal tray (optional extra, lazy imports, no routing duplication, no secrets); release workflow buildsscarcity-worker-X.Y.Z-windows-x64.zip; MSIX is a fail-closed seam (EXTERNAL_RELEASE_GATE: WINDOWS_CODE_SIGNING).finalize-release-bundlejob attests the zip + the finalSHA256SUMS(checksum file never modified after attestation); tag/SemVer/version-literal/main-ancestry guards untouched; Forgejo keeps sole development CI; no GHCR publish job until the frozen contract's first-release insertion (image itself is in-tree, built, unpublished).uv tool upgrade/ container tag pull / reinstall; no auto-update.verify=falseanywhere) + 23 security-acceptance tests (D-044 matrix) + 14 M10-B Codex tests through the full composed stack (client → coordinator → worker protocol → adapter → deterministic fake App Server), incl. ownership, cancellation, ambiguity, usage, isolation, leakage lines. Scenario→test mapping indocs/m10-acceptance.md; security matrix indocs/m10-security-acceptance.md.codex-cli 0.154.0-alpha.6.2— realinitializehandshake with controlled home adopted; unsigned-inaccount/readfails closed honestly. No turn.Review and audit trail (all reviews fresh, GLM-5.3 non-Flash, MAX)
d78a905worker.specbreaking fresh checkouts/tagged builds) → remediation r1 (track + attestation reconciliation + docs) → APPROVE @20d0a0cworker_client.pytray seam × codex registry; state-dir threading so the Codex controlled home follows the identity store)Validation at integration HEAD
d5cdc17uv sync --only-dev✓ ·make check1846 tests OK (~520 s) ·uv run basedpyright0/0/0 ·git diff --check✓ ·make package-check9/9 PASS ·make guardrails40 tests OK · actionlint both workflows clean · branch-diff secrets scan clean (12,305 added lines) · wheel/sdist/container built and inspected from a clean archive of this exact HEAD.Recorded external gates (not blockers; owner actions later)
EXTERNAL_RELEASE_GATE: WINDOWS_CODE_SIGNING— MSIX seam fails closed even with a secret configured; unsigned zip builds.EXTERNAL_ACCEPTANCE_GATE: LIVE_WINDOWS_ACCEPTANCE— Windows-native runtime never executed here.EXTERNAL_ACCEPTANCE_GATE: LIVE_CODEX_SUBSCRIPTION— a live turn needs an owner-performed officialcodex logininside a dedicated controlled home (isolation forbids~/.codex; token copying forbidden).PYPI_TRUSTED_PUBLISHER+ Forgejo runner/branch-protection owner actions unchanged from #97 (never claimed configured).Explicit confirmations
Nothing merged to
developby this PR's authors;mainuntouched; no release published; no ZCode execution adapter (D-047 stands); no credentials committed; no prompt/response content in default logs/audit; no automatic inference retry/failover; no generic worker shell/command execution; no private Creatidy infrastructure required for normal OSS use.One container, one process (D-041): python:3.12-slim, multi-stage wheel build, non-root runtime user (uid/gid 10001), /data volume as the only write path, EXPOSE 8787, HEALTHCHECK against the unauthenticated GET /healthz liveness endpoint, no baked secrets, no Docker socket, version visible in the startup banner/logs. examples/docker-compose.yml documents the real flag surface only (loopback host-networking default; LAN/VPN exposure strictly via the verified-TLS flags D-044 requires) plus update, volume and backup notes. Verified live on this host (Docker 29.7.2, WSL2 backend): image builds; /healthz serves {"status":"ok"}; healthcheck reaches healthy; single process confirmed; store survives restart (second bootstrap 409); non-root user confirmed; verified-TLS bind serves 200 with the correct CA, wrong CA fails verification (curl exit 60), plaintext refused (exit 52). Not published anywhere; the GHCR publication contract stays the recorded future contract in docs/release-engineering.md.Integration blockers corrected on this branch (
d5cdc17→28d30e8, 4 commits). Scope stayed surgical — no M06/M10 redesign, no release-platform work, external gates unchanged.Blocker 1 — physical Codex model identity.
--codex-model SLUGis now required with--allow-codex; the resource isResourceIdentity(worker_bridged, openai, <slug>, subscription_included)with no variant, binding the shipped calibrated catalog via the exact(provider, model)M02 rule (e.g.gpt-5.6-solwith its calibratedmedium/highvariants). The adapter rejects any selected model outside its resource (model_not_served) before discovery/spawn/thread/turn, and still verifies the effort against runtimemodel/list, pinning the exact selected identity per turn. The fake App Server and all E2E advertise real slugs against the real shipped catalog; the syntheticopenai/codexcatalog fixture is deleted. No catalog model namedcodexexists. (#107 closed with the corrected record.)Blocker 2 — production compatibility matrix. The composed server now builds real cells from administrator configuration: M04
default_cells_forper configured preset resource + newcodex_worker_evidence(the reviewed Stage-2 values verbatim: 8×PARTIAL, tool_calls/tool_results UNSUPPORTED, dated provenance2026-09-20,codex-cli 0.154.0-alpha.6.2/rust-v0.155.1), passed intoGatewayApplicationby_rebuild_applicationwith the same rebuild-on-configuration-change lifecycle as adapters. Streaming on evidenced composed deployments works without any test-only cell injection; tools requests are rejected from the realUNSUPPORTEDcell before dispatch; generic presets stay all-UNKNOWNfail-closed; built-in evidence remains the ceiling (no admin override surface). (#106 closed with the delivered/remaining boundary recorded.)Adversarial review (fresh GLM-5.3/MAX): APPROVE, zero blockers, zero DEFERs. The reviewer independently re-proved both gaps on
d5cdc17— notably the old adapter executed a wrong-model turn (502 != 200) and old composed streaming answered200with an empty matrix — and re-ran the full gate at28d30e8:make check1858 tests OK, basedpyright 0/0/0,git diff --checkclean,make package-checkPASS,make guardrails40 OK; scope audit (12 files, each serving one blocker) and secrets scan clean.Final integration blocker corrected on this branch (
28d30e8→30d39ee, two commits). Scope surgical: 4 files (+618/−11) —server_composition.py(the canonicalization),control_api.py(surfacing only), two test files. NoCompatibilityCell/EvidenceRefschema change, no M02 routing change, no evidence-value/preset/isolation/packaging change, no fallback.Fix:
build_compatibility_cellsnow canonicalizes onto the existing frozen D-043 key(channel, provider, model, variant, feature)— literally the same tuple the routing core rejects duplicates on (routing_core.py:2239). Semantically identical cells (same value, adapter, adapter_version, and exactEvidenceRef) merge to one; conflicting assertions for the same key fail closed with the typedCompositionErrornaming the full key and both evidence identifiers — no first/last/optimistic/restrictive winner. Output deterministically ordered exactly as the routing core orders. Compatibility is backend/surface evidence; multiple resources may execute one physical model (D-042) — worker/resource ownership is untouched (worker_adapter_mapstays resource-keyed).Surfacing: conflicting evidence at save time answers
400 invalid_request;_save_configcomposes the candidate config before any state mutation, so a rejected save can neither poison in-memory config nor reach the durable store. (Upgrade note, judged honest fail-closed: a pre-fix persisted config with conflicting same-key evidence now refuses server start with a remediation-bearing error instead of booting with a dispatch-500 matrix.)Adversarial review (fresh GLM-5.3/MAX): APPROVE, zero blockers. The reviewer independently re-proved discrimination on
28d30e8— the two-worker E2E failed there with the literal duplicate-cell rejections (20 != 10cell-count;200 != 500 invalid_statefrom a realRouteRequest), both dedupe unit tests failed with 10 extra duplicate cells, the conflict test failedCompositionError not raised— and the same tests pass on30d39ee. Verified: dedupe key/equality covers all 9 cell fields with total equality; the two resources remain two independent admittable routing targets with per-resource ownership; evidence modules (openai_http_evidence,codex_worker_evidence, presets) untouched since9462c30; #106 composed-streaming and #107 physical-identity suites green. Full gate at30d39ee:make check1868 tests OK (~712 s), basedpyright 0/0/0,git diff --checkclean,make package-checkPASS,make guardrails40 OK.