Skip to content

fix: unify cross-epic readiness consumers (T12293) - #2953

Merged
kryptobaseddev merged 13 commits into
mainfrom
task/T12293
Nov 16, 2026
Merged

kryptobaseddev merged 13 commits into
mainfrom
task/T12293

Conversation

@kryptobaseddev

@kryptobaseddev kryptobaseddev commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

A cancelled cross-epic prerequisite could admit work through start while next and spawn blocked it; archived prerequisites produced the opposite disagreement. WorkGraph planning also treated every declared dependency as blocked. Studio graph filtering could hide a satisfied prerequisite and give its pending dependent a false blocked halo.

Execution consumers reuse the core dependency-readiness policy: done and archived satisfy; cancelled, open, missing and unsupported evidence block. Canonical dependency evidence stays separate from selected tasks, hierarchy, candidate populations and counts. Required reads fail explicitly. Completion retains its separate cancellation and waiver semantics.

WorkGraph plans resolve real prerequisite statuses. Studio retains declared edge identities and supplies only prerequisite IDs/statuses independently of displayed nodes, including archives and records outside the node cap. Status and text filters therefore preserve readiness. Failed Explorer reads display an unavailable diagnostic while preserving the dashboard. Start refusals give state-specific remedies instead of suggesting completion of cancelled or nonexistent work.

CLEO tasks

Closes: T12293 AC1,AC2,AC3,AC4,AC5,AC6,AC7

Criterion evidence

Criterion Evidence
AC1 Independent cross-epic store fixtures and fresh compiled CLI processes reproduce the old WorkGraph plan defect for done/archive controls. Original saga/installed negatives and regressions remain retained.
AC2 The source audit below covers migrated execution consumers and justified remaining comparisons. New regression files exercise real planning, full-set graph evidence, status/text filters, node limits, legacy blockedBy, persisted dangling edges and required read failures. Positive single-file replay passes against the matching CI production artifact.
AC3 Done/archive controls use canonical archives; cancellation blocks execution. Completion and audited waivers retain their distinct contract. WorkGraph plans retain manual blocked and proposed states. Recovery text distinguishes cancelled, missing, proposed and open prerequisites.
AC4 No production identity, hierarchy, containment or dependency-row repair. Fixtures verify selected child counts and the CLI checks parent/dependency snapshots and project identity. Current main's claim-liveness changes are integrated without rewriting published history.
AC5 Retained independent negatives, fresh-process CLI regression and source tests; current artifact and final replay evidence recorded below. No global CLI installation or live Axiom data mutation.
AC6 Policy remains in core; CLI dispatch/rendering remains in cleo; Studio wires server evidence and renders the shared policy. Existing Task/TaskStatus contracts are reused; no new package or runtime contracts helper. Package-Boundary Check follows AGENTS.md.
AC7 / REQ-CROSS-EPIC-READINESS Typed readiness gate freshly executed and cached on exact final head 646fdd48ece0e12e7e816dc1525dc6fd3679afde: 39/39 pass, exit 0.

Dependency-status consumer audit

Search scope: production TypeScript under packages/, excluding test/spec files and generated dist/. Searches cover dependency/blocker status reads, completed/satisfied ID sets, getUnresolvedDeps callers, and ready/blocked/next/parallel selectors. Symbol impact was checked against qualified candidates and source callers; Nexus reports partial coverage, so this is not proof of complete runtime discovery.

Migrated or already on the shared rule:

Consumer Final contract
tasks/dependency-check, deps-ready, task-tools/score-task-priority, analysis rankForAnalysis One execution predicate; direct, transitive and leaf blockers retain missing/cancelled IDs. Scoring resolves canonical evidence separately from candidates.
task-work/index.assertTaskStartable Canonical target/dependency reads before any claim/focus write; reused by start, pivot and status update. Returns the validated task to avoid duplicate target reads.
tasks/task-data Overview, dependency details, transitive hints and dependency relation readiness use canonical archive-aware evidence; selected counts/downstream discovery stay separate.
tasks/task-blockers, task-tree, generic-tree, task-tools/build-task-tree Shared blockers/status predicate; missing identities remain blocked; only pending/active work can be ready. Pure tool callers supply their evidence population.
tasks/show, task-context Canonical dependency records plus explicit missing/cancelled blockers; failed reads remain failures.
tasks/graph-ops.getNextTask/getParallelTasks Shared ready selector; active status no longer bypasses unmet dependencies, and parallel admission no longer infers readiness from wave zero.
tasks/compute-task-view.nextAction Shared execution blockers in both single and batch paths. CLI/Studio Kanban consumers therefore receive the same execution hint; completion is assessed separately.
orchestration/waves/index/bootstrap/unblock/validate-spawn, orchestrate/query-ops, tasks/plan/task-next Existing canonical lookup and common policy; selected hierarchy/counters stay separate from external evidence.
skills/orchestrator/startup, sentient/tick Existing fixes retain canonical external prerequisites before selection/admission; sentient wave ordering receives only already-ready candidates.
orchestration/dashboard/critical-path, classify-readiness Queue/blocker counts and pure frontier annotations reuse the common rule; classifier children are an explicitly supplied population.
sessions/briefing, CLI focus Archive-aware briefing lookup and shared current/blocked checks. Focus preserves unassessed dependency IDs and failed source diagnostics.
memory/brain-reasoning, intelligence/impact Causal blockers and hypothetical remaining prerequisites use canonical evidence/shared blockers. Cancellation cannot forecast an unresolved hard edge as satisfied.
workgraph/containment.readyFrontier Shared dependency predicate, non-actionable statuses stay blocked, and a missing joined record rejects the assessment explicitly. No containment query rewrite.
Studio tasks-adapter, GraphTab.isBlocked Shared predicate for halos and the legacy public helper; genuinely missing evidence stays blocked. Filtered node lists use a separate full status record.
Studio explorer-loader, GraphTab, WorkGraphView Retain hard-edge identities from selected tasks; load exact external/archived statuses, including legacy blockedBy references. Status/text/node-cap filters never determine satisfaction. Evidence-only rows do not enter nodes, labels or epic counts. Required reads propagate; the dashboard marks a failed Explorer unavailable.
workgraph/scaffold-plan.generatePlanningDoc (cleo workgraph plan) Canonical archive-aware lookup and shared blockers; pending work with done/archived dependencies is ready. Only unmet IDs appear in blockedBy; manual blocked state remains blocked, proposed work is not offered.

Remaining comparisons are justified by a different domain/operation, not an alternative execution readiness rule:

  • Completion: tasks/complete, done-plan, compute-task-view.readyToComplete, and dependency-check.getUnresolvedDeps intentionally accept terminal cancellation under the completion/waiver contract. getUnresolvedDeps is no longer used for start admission. Task-view execution hints use a separate shared blocker assessment.

  • Integrity/history: dep-graph-validator diagnoses cancelled references and done records with failed verification; the skill orchestrator validator checks historical completion order. These are integrity/evidence diagnostics, not satisfaction predicates. validation/validate-ops counts completed tasks/AC evidence and checks containment consistency.

  • Planning: graph-ops.computeDependencyWaves, graph cache/order/critical-path helpers and phase dependency planning describe the supplied topology, including a final cyclic planning group. Wave membership is not current readiness. The wave status predicate is shared, while actual next/parallel admission and saga waves assess canonical evidence separately.

  • Projection/counts: nexus/deps reports raw resolution/permission status; stats/index.rankBlockedTask, tasks/analyze, tasks/task-analyze, saga rollups and Studio session pages count stored states or potential downstream impact; analysis candidate recommendations still use canonical shared ranking. WorkGraph SQL projects raw joined status before the shared grouping rule. Graph edge rendering filters endpoints for visibility only; it no longer filters dependency evidence. Agent lifecycle lanes consume the canonical task-view/count signal rather than inspect dependency statuses.

  • Other dependency domains: verification-gate depState.status === 'passed', phase/step sequencing and SQLite table dependency ordering are not task hard dependencies and do not use task status values.

  • Recovery text: task-work/index compares missing/cancelled/proposed evidence only to select a feasible remedy after the common readiness assessment; it does not change satisfaction. Open work is finished before complete, cancelled work is restored or its relation reviewed, and missing identities are located/restored/corrected after identity checks.

  • Svelte display state: GraphTab.passesFilter, palette helpers, SvgRenderer, StatusBadge, EpicProgressCard, activity feeds and dependency-detail colours inspect visibility, stored task state or colour tokens. They do not decide prerequisite satisfaction. GraphTab.isBlocked is migrated, not exempted as legacy.

  • WorkGraph progress buckets: scaffold-plan.buildEpicEntry and its bottleneck/progress recommendations count selected child states; blockedChildren is the stored blocked-status bucket. The ready/blocked-task projection assesses hard prerequisites through the shared policy.

Verification

Current head: 646fdd48ece0e12e7e816dc1525dc6fd3679afde. Production source is unchanged from 0cbbe7b1a; the final commit strengthens the archive visibility regression. Implementation 83f24d133, main integration f122f88cf, fixture-observation assertion 0cbbe7b1a, archive visibility contract regression 646fdd48e. CI: 43809726478.

Independent original-source negatives on reviewed head 9ad74ba (all through one-file governed invocations):

File/route Failed / passed Observed defect
workgraph/scaffold-plan.test.ts 4 / 14 Done/archive work incorrectly blocked; required archive read never attempted; mixed-state work incorrectly blocked.
Studio tasks-adapter.test.ts 2 / 30 Hidden done/archive prerequisites receive blocked halos.
Studio GraphTab.test.ts 4 / 34 Filtered done/archive halos; archived and missing evidence in the legacy helper.
task-work/start-deps.test.ts 2 / 7 Cancelled/missing diagnostics recommend infeasible completion.
Studio explorer-loader.test.ts 6 / 11 Archive, capped-out and genuinely missing hard-edge identities disappear from the bundle.
Actual compiled cross-epic-readiness-cli.test.ts 2 / 4 cleo workgraph plan contradicts done/archive oracle while the other CLI routes pass.

The original logs predate additional proposed-remedy and blockedBy/read-fault controls; those controls are included in the positive replay, not claimed as additional original failures. Logs remain in temp/readiness-rereview-*-original.log. Genuine corruption is fixture-only, foreign keys are restored to ON, and a real foreign-key violation is independently observed. No production repair or weakened guard.

Changed-file Biome and diff checks pass. Architecture 43 passed / 0 failed / 1 skipped (local built-startup freshness guard; CI enforces the current build). PR-mode sync-invariant and skill-coverage gates pass; no baseline edits. Nexus impact reports partial/missing coverage, complemented by direct source callers; this is not complete runtime-call discovery.

The governor refused stale core dist (E_WORKSPACE_STALE_DIST); the matching CI artifact then admitted all positive single-file replays without stamp overrides. Local builds remain prohibited. Full local build/suite/broad typecheck remain skipped per worker policy. Earlier matching-policy checkpoint: 431 targeted tests; the current-round replay and typed gate below are reported separately, without double-counting.

Native task-anchored changeset included. No provider/model launch, self-review or merge. Independent head-specific AC verdicts and green required CI remain merge prerequisites.

Written primarily by Codex under the dispatched worker scope.

Current-round positive verification

One-file invocation Passed
packages/core/src/workgraph/__tests__/scaffold-plan.test.ts 18
packages/studio/src/lib/server/tasks/__tests__/explorer-loader.test.ts 20
packages/studio/src/lib/components/tasks/__tests__/GraphTab.test.ts 38
packages/studio/src/lib/graph/adapters/__tests__/tasks-adapter.test.ts 32
packages/core/src/task-work/__tests__/start-deps.test.ts 10
packages/cleo/src/cli/__tests__/cross-epic-readiness-cli.test.ts 6

124 passed across six individual files, each through cleo run --wait --class test -- pnpm exec vitest run <one-file>. The actual CLI probes include cleo workgraph plan; all five dependency outcomes agree with the independently stated oracle.

Artifact: run 43807149487, built merge 9dc8657c710c57c0798ec7cff33a59c9b214b30a, SHA256 00dc1587e61fe9b95e8782c1ec2f2ecd9b1b1a7fba24328c31228ae2605b22a3. Its tree is identical to source head 0cbbe7b1a. Final head 646fdd48e differs only in the loader test; production source is identical, and the governor accepts the build without changing stamps. Only validated generated packages/*/dist directories were staged in ignored worktree output; native artifacts and the global installation are unchanged.

CI 43807149487 failed only the old archive-toggle assertion, which required deleting a hidden prerequisite edge. The corrected test retains node hiding and separately checks hidden/visible edge rendering while preserving dependency evidence; the whole file now passes 20/20. This correction makes no production change and relaxes no guard. All other applicable checks passed in that run; final-head CI is linked above.

An import audit over the nine owned production files finds three added runtime imports. They terminate in the shared policy leaf, directly or through the pure adapter; the leaf has no runtime imports and the adapter's loader reference is type-only. No new module-import cycle is introduced by these edges. Runtime-call discovery remains partial.

Typed gate: cleo verify T12293 --run --req REQ-CROSS-EPIC-READINESS → 39/39 passed, exit 0, freshly executed and cached for exact final head 646fdd48ece0e12e7e816dc1525dc6fd3679afde. Together with the six changed files, 163 targeted tests passed across seven individual-file executions for this round. No author review or task completion is implied by the test cache.

cleo done --from-merge 2953 --dry-run exits 0, recognizes AC1–AC7, and leaves the task waiting for independent verdicts on final head 646fdd48e. Task closure and merge remain with the reviewer/merge workflow. Original installed/source evidence remains in T12293's canonical cross-epic-readiness-parity note and attached readiness checkpoints.

Final-head CI snapshot

Run 43809726478, head 646fdd48ece0e12e7e816dc1525dc6fd3679afde: all applicable required jobs passed, including all eight unit shards.

Check State
Detect Changes success
Contracts Dep Lint success
Lint & Format success
Flaky Quarantine Budget (T14257) success
Build (ubuntu-latest) success
Repo Lints success
Documentation Coverage (forge-ts) success
Packed CLI and Studio Artifact success
Build & Verify (ubuntu-latest) success
Type Check success
Post-build Checks success
Core Bundle Budget (T14257) success
Unit Tests (ubuntu-latest, shard 6) success
Unit Tests (ubuntu-latest, shard 2) success
Unit Tests (ubuntu-latest, shard 3) success
Changeset Lint (T13281) success
Unit Tests (ubuntu-latest, shard 8) success
Unit Tests (ubuntu-latest, shard 1) success
Unit Tests (ubuntu-latest, shard 5) success
Unit Tests (ubuntu-latest, shard 7) success
Unit Tests (ubuntu-latest, shard 4) success
CI success

Conditional native/release jobs were skipped by CI. Studio verification uses the real SQL loader and pure GraphTab/adapter exports; a live browser session was not exercised. Full local build/suite/typecheck remain skipped per worker policy.

@kryptobaseddev kryptobaseddev changed the title fix: unify dependency readiness reports and saga failures (T12293) fix: unify cross-epic readiness consumers (T12293) Nov 16, 2026
@kryptobaseddev
kryptobaseddev merged commit 035c9db into main Nov 16, 2026
34 of 35 checks passed
@kryptobaseddev
kryptobaseddev deleted the task/T12293 branch November 16, 2026 05:56
@github-actions

Copy link
Copy Markdown
Contributor

CLEO merge-close receipt: the store owner's sweep (cleo done --from-merge) will record this PR's evidence for:

  • close T12293 (AC1, AC2, AC3, AC4, AC5, AC6, AC7)
{
  "prNumber": 2953,
  "mergeSha": "035c9db8f388ef7d183165ad33459e93d336f0f2",
  "headSha": "646fdd48ece0e12e7e816dc1525dc6fd3679afde",
  "directives": [
    {
      "kind": "closes",
      "taskId": "T12293",
      "acs": [
        "AC1",
        "AC2",
        "AC3",
        "AC4",
        "AC5",
        "AC6",
        "AC7"
      ]
    }
  ],
  "errors": [],
  "ciGreen": true
}

@kryptobaseddev

Copy link
Copy Markdown
Owner Author

CLEO merge-close: T12293 is waiting to close from this PR (re-checked every sweep): /Users/keatonhoskins/Library/Application Support/cleo/worktrees/857f8997875f12e3/T12293 has 646fdd4 checked out, which does not contain PR #2953's merge commit 035c9db. A squash- or rebase-merged branch never contains its merge commit, so the tools must run on the merged tree; evidence.ciSatisfies is set, so ci: needs no local run.

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.

1 participant