D1-02: Make the frozen Scarcity Router task runnable end-to-end #33
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/creatidy-kernel!33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/d1-02-dogfood-composition"
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?
Closes #32. Parent program: #30. Predecessor evidence: #31 (frozen D1-01 contract).
What this adds
The thinnest supported composition (D1-02) that makes the frozen dogfood task
BioMedical-IT/scarcity-router#143runnable end to end through one Kernel entry point, without implementing #143 itself and without any paid/live call or real PR:src/creatidy_kernel/adapters/dogfood.py— typed controller-ownedDogfoodTaskSpec(repository identity, base branch, optional pinned exact base SHA, frozen instruction, allowed changed paths, argv-only verification plan, typed structural policy, attempt budget, no-merge/no-deploy), the frozenscarcity_router_143_task()builder, exact-base establishment/freezing from a read-only source checkout, disposable controller-owned workspace/object clones, controller-owned Git candidate subjects (read-tree/add -Avia temp index →commit-treeon the exact base), the changed-path gate, the bounded verification-command runner (pinned cwd, per-command timeout, bounded capture, exit-code evidence), deterministic structural anti-weakening checks with an explicit deferred-to-independent-review list, human-readable lifecycle output, durable export/status, and the bounded live Router/Codex/Forge composition from documented environment variables only.creatidy-kernel dogfood run|status|export(experimental, owner-approved, trusted-development; explicitly not a generalrun issuefeature).Reuse decisions
advance_work_unit,SQLiteProgramStore,ScarcityRouterAllocator,CodexRuntime+CodexInputswiring,ForgejoForge+ synthetic/conditional transports, AGit delivery discipline.reference_git(optional author identity, index file, timeout; splitreference_git_bytes),deliver_reference_pr(optionaloperation_id/schema/title/body),advance_work_unit(optionalartifact_path, default"result.txt"preserved),CodexConnectionprotocol (read-only properties soCodexStdiosatisfies it).Exact-base semantics (D1-01 → D1-03)
The D1-01 SHA
781bace…is historical evidence only. The task spec defaults toexpected_base_sha=None: the base is resolved once from the source checkout (refs/remotes/origin/<branch>, falling back torefs/heads/<branch>) and durably frozen on first admission; recovery reuses the frozen base even if the source branch moves.--expected-base <sha>(or the spec field) pins an exact base when reproducing a known one.Candidate and acceptance
The controller never trusts a worker-provided commit: the candidate commit is created by the controller from the disposable workspace tree against the exact base, recorded durably, and re-derivable deterministically after crashes. Verification binds to that exact Git subject; untracked verification artifacts are recorded as confined and never alter the accepted subject, while tracked mutations after verification reject the candidate.
Tests (deterministic; no paid inference, no real PR, no credentials)
tests/test_dogfood.pyuses a real Git fixture repository shaped like the #143 subject, a native-shaped fake Codex connection, and a synthetic Forgejo forge:Validation
make check: ruff format/check, basedpyright (strict), lint-imports, 788 tests passed, secrets scan clean,git diff --check.make package-check: wheel/sdist/isolated install + CLI replay passed.49af0c4fd7475b6066a8f06fccdbe6b187042673(canonicaldevelop).Known limitations for D1-03 (live run)
assertTrue(worker.cancels,assertEqual(bystander.cancels, [])) and required names must be re-verified against the actual then-current base file before the live run.git fetch) remains an owner responsibility.No merge, no deploy, no release. Independent whole-PR review required before owner merge.
Review dispatch 1 — routing and verification record (PR #33)
72f3ddcee754f1d67cc75e914375971818a45372, basedevelop@49af0c4fd7475b6066a8f06fccdbe6b187042673.repository_review(catalog_version 4, profile_policy_version 8, resource_policy_version 1, selector_mode balanced, degraded=false, evaluated_at 2026-09-28T13:39:07Z).router_selected:gpt-5.6-sol/openai/medium("GPT-5.6 Sol Medium", eligible, margin 0).dispatched: GLM-5.3 / zai-coding-plan / max — the Router-returned eligible alternative (listed alternative "GLM-5.3 Max", eligible=true, satisfies every hard requirement).routing_result=HARNESS_FALLBACK(owner provider constraint; no local ranking invented, no requirements lowered).am-1790602778504-ham7fd(modelocal, versionsfalse, prompt/review-pr https://forgejo.creatidy.com/Creatidy/creatidy-kernel/pulls/33).D1-02 PR #33 review: GLM-5.3 (zai-coding-plan) · maxmatches the dispatched Router-eligible identity after the established provider adapter.Review dispatch 1 — terminal record:
REVIEW_INFRASTRUCTURE_BLOCKEDFrozen review subject unchanged: HEAD
72f3ddcee754f1d67cc75e914375971818a45372, basedevelop@49af0c4fd7475b6066a8f06fccdbe6b187042673. No code changed in this boundary.Dispatch attempts for this one frozen review boundary (all with verified task-level model resolution
GLM-5.3 (zai-coding-plan) · max):am-1790602778504-ham7fd(13:39Z) with a display name; DISPATCH_VERIFIED resolution returned. No Agent Manager session was ever created (verified repeatedly viaaction=listand local session recall over ~95 minutes); nothing published on the PR.am-1790608539038-qojb7u(15:08Z), changed input: display name without#. Resolution verified. No session created; nothing published.am-1790608958999-9sfkvu(15:29Z), changed input: exact literal contract payload with no extranamefield. Resolution verified:Resolved models:\n- session: GLM-5.3 (zai-coding-plan) · max. No session created; nothing published.Diagnosis: the Agent Manager extension-side asynchronous session creation is not processing dispatch requests (
.kilo/agent-manager.jsonshows no session creation for any of the three request IDs; the only present sessions are this implementation session and the prior D1-01 session). The same dispatch path demonstrably worked yesterday (PR #28's verified review dispatch). The failure is infrastructure-only: request acceptance and model resolution succeed; session creation never occurs.Per
/deliver-issue: corrected launch retries exhausted (2 of 2); infrastructure/routing failures consume no remediation budget (remediation_usedstays0 / 10); no valid independent reviewer could be dispatched, so no substantive verdict exists for this HEAD and none is inferred. The Router selection itself was valid and is recorded in the previous entry (selectedgpt-5.6-sol/openai/medium; dispatched eligible alternativeglm-5.3/zai/maxunder the owner's no-OpenAI constraint,routing_result=HARNESS_FALLBACK).Terminal condition:
REVIEW_INFRASTRUCTURE_BLOCKED— notREADY_FOR_OWNER_MERGE. All non-review evidence is complete and green:make check(788 tests, ruff/basedpyright strict/lint-imports/secrets/diff-check),make package-check, exact-HEAD validation at72f3ddc. To finish delivery: restart/restore the Agent Manager extension session processing, then run a fresh/deliver-issuereview dispatch for this unchanged HEAD (a new dispatch boundary, reusing the same routed configuration is not automatic).Remediation 1 complete — new review subject frozen
0893ed988d4d4e210469c5503627d0a56e2b35f4(branchfeat/d1-02-dogfood-composition, same PR #33, base unchanged49af0c4fd7475b6066a8f06fccdbe6b187042673).remediation_used = 1 / 10(one owner-directed cycle; the priorREVIEW_INFRASTRUCTURE_BLOCKEDdispatch produced no substantive review and consumed no budget).Blocker 1 — Codex subprocess environment (
src/creatidy_kernel/adapters/codex_stdio.py,src/creatidy_kernel/adapters/dogfood.py)CodexStdionow accepts an optional explicitenvironment; both the--versionprobe and theapp-serverprocess are launched with exactly that environment (env=on bothPopencalls) — no merge with the ambient environment.codex_environment(): a closed set (HOME,PATH,LANG,LC_ALL,TMPDIR; PATH falls back toos.defpath). Everything else —CREATIDY_DOGFOOD_ROUTER_KEY,CREATIDY_DOGFOOD_FORGE_TOKEN, and every unrelated owner variable — is dropped, not blacklisted. Codex authentication remains its own HOME-based~/.codexmechanism, so no environment-carried secret is required (noGENUINE_OWNER_DECISION_REQUIREDcondition arose).tests/test_codex_stdio.py,tests/test_dogfood.py): synthetic sentinel credentials in the parent environment are proven absent from the environments of BOTH the version and app-server subprocesses; the explicitly allowed operational entries are proven present; default inheritance is proven unchanged for non-opted callers; invalid explicit environments are refused;codex_environment()is proven closed and sentinel-free.Blocker 2 — verification requires Git-clean workspace (
src/creatidy_kernel/adapters/dogfood.py)??) paths both reject. Evidence recordstracked_mutations_after_verificationanduntracked_paths_after_verificationseparately with the strict subject note. Verification remains bound to the same candidate HEAD..gitignore.tests/test_dogfood.py): a zero-exit trusted command that creates a non-ignored untracked file rejects the candidate with no acceptance and no PR; the pre-existing tracked-mutation rejection is preserved; a caching verification command whose artifacts are ignored still accepts.Validation at
0893ed9:make checkPASS (794 tests, ruff format/check, basedpyright strict, lint-imports, secret scan clean,git diff --check);make package-checkPASS. No dependency/tooling changes, somake auditis not triggered by this cycle. No live inference, no real PR.Fresh independent whole-PR review dispatch for this new exact HEAD follows as a new boundary.
Review dispatch 2 (post-remediation HEAD
0893ed9) — terminal record:REVIEW_INFRASTRUCTURE_BLOCKED0893ed988d4d4e210469c5503627d0a56e2b35f4, basedevelop@49af0c4fd7475b6066a8f06fccdbe6b187042673. Exact-head CI: success (run #2073,pull_request, 56s).repository_review, monotone tightening L4 / reasoning-coding-tool_use 5/5/5 / tool use + reasoning mode required; catalog_version 4, profile_policy_version 8, resource_policy_version 1, degraded=false, evaluated_at 2026-09-28T16:39:04Z.router_selected=glm-5.3/zai/max("GLM-5.3 Max", eligible, scarcity labelnormal) — matching the owner preference directly; no fallback needed this time (routing_result=PRIMARY).dispatched= GLM-5.3 /zai-coding-plan/max(established provider adapter).am-1790613561389-3l3gmv(modelocal, versionsfalse, literal payload/review-pr https://forgejo.creatidy.com/Creatidy/creatidy-kernel/pulls/33). DISPATCH_VERIFIED: harness resolutionResolved models:\n- session: GLM-5.3 (zai-coding-plan) · maxmatches the routed identity.action=list, persisted Agent Manager state, and local session recall); no review or comment was published. This is the same extension-side session-creation failure as the previous boundary, where three dispatch variants (with display name, name without#, and the exact literal payload) all failed identically over 95+ minutes — the fault is not in the dispatch payload, so no meaningful corrected retry input exists at this level, and identical re-dispatch without a changed hypothesis is refused.REVIEW_INFRASTRUCTURE_BLOCKEDagain. PR #33 remains open and unmerged;remediation_used = 1 / 10(the infrastructure failure consumes no review verdict and no budget).Everything except the independent review is complete at
0893ed9: both owner blockers fixed with regressions,make checkPASS (794 tests),make package-checkPASS, exact-head CI green. When Agent Manager session creation works again, dispatch a fresh whole-PR review for this unchanged HEAD; the substantive verdict is the only missing readiness element.