Skip to content

fix(claude): fail closed on artifact absence claims - #290

Draft
Tarik Skalić (tarikskalic33) wants to merge 36 commits into
feat/metacognitive-executive-v1from
fix/claude-artifact-discovery-v1
Draft

fix(claude): fail closed on artifact absence claims#290
Tarik Skalić (tarikskalic33) wants to merge 36 commits into
feat/metacognitive-executive-v1from
fix/claude-artifact-discovery-v1

Conversation

@tarikskalic33

Copy link
Copy Markdown
Member

Why

Claude sessions were producing false global negatives from a narrow scope (current checkout/default-branch search). A concrete example is ProofPrism: the current GitHub state contains a branch named claude/proof-prism-v1-ltti67, but exact content search on canonical main finds no ProofPrism implementation, and that branch is currently the head of unrelated cleanup PR #287. A branch-name hit and an implementation hit are different evidence classes.

Change

  • add .claude/hooks/artifact-locator.sh to refresh and search all locally known Git refs, worktree paths/content, commit messages, and GitHub PR metadata;
  • emit explicit machine verdicts: IMPLEMENTATION_EVIDENCE_FOUND, NAMED_REFERENCE_FOUND, INCOMPLETE, or NO_MATCHES_IN_COMPLETE_REPO_SCAN;
  • add .claude/skills/locate-artifact/SKILL.md requiring the locator before any negative existence claim;
  • inject an ABSENCE-CLAIM GATE on every UserPromptSubmit, so the rule survives ordinary session drift/compaction;
  • preserve the distinction between canonical main state and existence elsewhere in stacked PRs, historical refs, Drive/corpus, or provider workspaces.

Safety property

A miss in the current worktree can no longer justify the sentence X does not exist.

A matching ref name also cannot justify X is implemented without inspecting that ref.

If remote/PR discovery is incomplete, the locator fails closed and requires a scoped finding instead of a global claim.

Stack

Base: feat/metacognitive-executive-v1 / PR #285 @ 955338f6cf2590c1c38b79ab57a9d09692fd560e.

No constitutional runtime files are modified.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hook-generator Ready Ready Preview Aug 21, 2026 11:41pm
hub Ready Ready Preview Aug 21, 2026 11:41pm
platform-picker Ready Ready Preview Aug 21, 2026 11:41pm

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
aegisomega 54a74bd Commit Preview URL

Branch Preview URL
Aug 22 2026, 02:49 AM

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deployment failed for project hook-generator with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/tariks-projects-e9198507?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deployment failed for project platform-picker with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/tariks-projects-e9198507?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deployment failed for project hub with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/tariks-projects-e9198507?upgradeToPro=build-rate-limit

Copy link
Copy Markdown
Member Author

Repository-universe census is now mechanically established on full Git history.

TDD RED: run 32515601975 / job 96876437555 failed at the preregistered fixture because scripts/repo-universe.sh was intentionally absent.

GREEN implementation: scripts/repo-universe.sh @ 6132628. Run 32515672232 / job 96876657171 checked out complete history (fetch-depth: 0), fetched every remote branch/tag, passed the deterministic fixture, then measured the real repository:

  • canonical main = 32b7eb6
  • history_complete = true
  • logical refs/branches observed = 102 (includes the PR merge ref in this runner census)
  • all-ref unique commits = 2237
  • commits reachable from canonical main = 1204
  • unique commits reachable from fetched refs but NOT from canonical main = 1033
  • evidence artifact = 9458670893
  • artifact ZIP sha256 = c2497aadd647a98486c2d369da185cb72538d11a9fca0837cf7e5f4e1d673ff9

So the operator's >900 off-main commits statement is confirmed; current measured value is 1033 in the complete-history runner snapshot.

A subsequent commit 4543b1f wires complete-history/ref hydration into Claude SessionStart. Claude now receives a repository-universe summary before forming repo-wide beliefs. If hydration fails, global absence claims are explicitly forbidden.

Epistemic invariant: main = canonical/admitted state; all fetched refs = searchable artifact universe; neither implies that every off-main artifact is valid, current, or production-admitted.

Copy link
Copy Markdown
Member Author

Repository reconciliation checkpoint: operator directed full organize/clean/reconcile/merge with no skipped lineage or evidence. A full design is now committed at docs/superpowers/specs/2026-08-21-repository-reconciliation-continuity-design.md on this existing branch (no new branch created). The design freezes three universes (Knowledge / Active Work / Admitted Runtime), stable WorkID identity, fail-closed lineage resolution before branch creation, bottom-up exact-head merge discipline, structural recovery for ProofPrism-class artifacts, and proven-redundancy-only deletion. Current preferred convergence target remains the existing #275-derived UCI spine. No branch deletion or canonical merge is performed before the written reconciliation spec is reviewed and an implementation plan is derived from it.

Copy link
Copy Markdown
Member Author

Reconciliation Task 1 RED → GREEN checkpoint.

VALID RED (after removing the unrelated pytest dependency failure):

  • branch head: 82897e32ff6bfd9cc6dc3ffaf44e26dcc7377033
  • workflow run: 32536866834
  • job: 96939331040
  • existing repo-universe fixture passed;
  • all 5 new reconciliation census falsifiers failed for the intended reason only: scripts/reconcile-repository-universe.py was absent (Errno 2).

GREEN implementation head: 8a97e0a59e5fbda9a8c7d7938f4b58f23bf0c451.

  • workflow run: 32536964237
  • job: 96939617736 — SUCCESS
  • reconciliation falsifiers: 5/5 PASS
  • inherited repo-universe fixture: PASS
  • full Git history census: 2254 all-ref commits; 1204 reachable from canonical main; 1050 reachable commits not on main; 103 logical branches in this runner view
  • GitHub PR census: 267 PRs, completeness established under the <1000 hard limit
  • canonical main independently resolved as 32b7eb6a37fb69d19dd80189390b6641c5004ef1
  • reconciliation manifest: sha256:7aacbd14ca03378f38362c966da8682e416684e4624cac1f0e48eb8906dd6761
  • evidence artifact: 9465730156; artifact ZIP SHA-256 fd22d9bf97e85247048fef2ac31bb4d6c0caf69927b48f1314835421607a54f5

No branch deletion, merge, admission, or other canonical mutation occurred. Discovery remains evidence-only; even complete discovery yields CLASSIFICATION_REQUIRED, not deletion authority.

Next: Task 2 — stable WorkID lineage graph. It will be preregistered RED first on this same branch; no new branch.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deployment failed for project hub with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/tariks-projects-e9198507?upgradeToPro=build-rate-limit

Copy link
Copy Markdown
Member Author

Reconciliation Task 2 RED → GREEN checkpoint.

A syntax-error run was explicitly rejected as invalid RED. Valid RED was then established at branch head 67b0406bc6edef34503ac3bb09d1bafd3fe41d0e:

  • run 32537161243, job 96940143111
  • Task 1 census tests remained GREEN
  • all 6 WorkID lineage falsifiers failed only because scripts/build-work-lineage.py did not exist (Errno 2).

GREEN implementation head: a63952f750b76178207496f41dbfd2ed78fbc41d.

  • run 32537272363, job 96940442859 — SUCCESS
  • WorkID lineage falsifiers: 6/6 PASS
  • Task 1 census falsifiers: 5/5 PASS
  • inherited Git universe fixture: PASS
  • real current census at this checkpoint: 2259 all-ref commits / 1204 main-reachable / 1055 off-main reachable; 103 logical branches; 267 PRs
  • real WorkID graph: 283 work items; 12 active-spine nodes; 0 missing declared WorkIDs
  • WorkID manifest: sha256:2e05436ff7886bdb6b4f27d7559e2c5ca995ce19f8f8cc67396ad994d193ad16
  • evidence artifact 9465823807, ZIP SHA-256 1952845dc66fe28de174bdae1d09998a9d7354e2ffa01f503b954fabb9cbfe12

PR-backed work identity is now pr:<number> and independent of branch name. Branch-only legacy work is retained as UNKNOWN_FAIL_CLOSED with a content-seeded migration identity; it is not silently deleted or promoted. The approved #275-derived spine and the #268/#270/#272/#273 historical proofline relationship are explicit in .aegis/reconciliation/spines.v1.json.

No canonical merge/deletion occurred. Next Task 3: fail-closed lineage resolver + branch-creation gate, again RED first on this same branch.

Copy link
Copy Markdown
Member Author

Reconciliation Task 3 RED → GREEN checkpoint.

VALID RED:

  • branch head 5c6508932ce59a12121f91a9f2ad24143039042b
  • run 32537405382, job 96940788477
  • inherited repo-universe fixture PASS
  • Task 1 census falsifiers 5/5 PASS
  • Task 2 WorkID falsifiers 6/6 PASS
  • all 8 resolver falsifiers failed only because scripts/resolve-work-lineage.py was absent (Errno 2).

GREEN implementation head: 0abdd55b2bdf5d19e7ad40f4e81e2aad16f482a0.

  • run 32537559079, job 96941207479 — SUCCESS
  • resolver falsifiers: 8/8 PASS
  • inherited Task 1: 5/5 PASS
  • inherited Task 2: 6/6 PASS
  • hook syntax: PASS for .claude/hooks/session-start.sh and .claude/hooks/user-prompt-intake.sh
  • current hosted census at this checkpoint: 2264 all-ref commits / 1204 main-reachable / 1060 off-main reachable; 103 logical branches; 267 PRs
  • real WorkID graph: 283 items / 12 active-spine nodes / 0 missing declared WorkIDs
  • current lineage manifest: sha256:c6e9c7b5ed0f063ace25c33db2f1d736fa2bbedb8a37ff5ee31d96a5590e5464
  • evidence artifact 9465910968, ZIP SHA-256 8e49bb2925ec80afac9e510dfd51b698f08dc01fd19a3dc38e23782af984b8f5

The branch-creation invariant is now executable: branch_creation_allowed is true only for CREATE_NEW under complete discovery. Exact compatible active work returns CONTINUE_EXISTING; explicit parents return STACK_ON_EXISTING; compatible closed work returns RESUME_ABANDONED; competing evidence or incomplete discovery returns AMBIGUOUS_HALT. Branch-name hints are deliberately excluded from compatibility evidence.

Claude SessionStart now attempts full Git + PR + WorkID hydration and fails closed if continuity cannot be established. UserPromptSubmit injects the branch-creation gate every prompt. No canonical merge or branch deletion occurred.

Next: Task 4 — deterministic classification plus append-only replayable reconciliation decision chain, RED first on this same branch.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deployment failed for project hook-generator with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/tariks-projects-e9198507?upgradeToPro=build-rate-limit

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