Skip to content
This repository was archived by the owner on Sep 28, 2026. It is now read-only.

feat: install reliability contract owners - #52

Merged
jnyross merged 4 commits into
mainfrom
implement/wf-01
Aug 10, 2026
Merged

jnyross merged 4 commits into
mainfrom
implement/wf-01

Conversation

@jnyross

@jnyross jnyross commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • make SKILL.md the navigational entry point and install exactly two reliability owners
  • cleanly route generic complexity, topology, lifecycle, script, and self-test consumers to one owner per contract
  • require positive proof that every delegated worker lacks durable-mutation capability at preflight and runtime reproof
  • restore the existing task-result passed vocabulary without changing collector behavior
  • deepen the top-level bundle validator for owner links/headings, machine data, relative links, fences, and graph coherence
  • add TDD structural controls for both missing owner links, fenced headings, angle-bracketed HTTPS, malformed data, broken links, and incoherent graphs

Closes #41

Validation

  • Ran .\scripts\run_windows_regressions.ps1 from Codex Desktop on Windows.
  • Added or updated a regression case for new behavior.
  • If no regression case is appropriate, explained why below.

Test notes

Documentation-only exception: #41 is a documentation and contract migration. The added regression controls cover only the existing skill-bundle acceptance seam. Merged PRs #50 and #51 supply root-workflow behavior and structural testcase conformance through main; this PR preserves but does not redefine those contracts.

  • merged latest origin/main at 8e8e3ae34f4855eeaeb6377a10e6cb2a8f410b89; retained owner navigation, explicit case_id binding, Acorn dependency setup, structural testcase deletions, and both WF-01/WF-03 runner entries
  • npm ci && python3 skills/codex-graph/scripts/validate_skill.py && python3 -m unittest -v skills/codex-graph/scripts/test_validate_skill.py skills/codex-graph/scripts/test_root_workflow.py && node --test skills/codex-graph/testcases/harness/testcases.test.js — dependency install and bundle acceptance passed; 7 Python tests and 14 structural-conformance tests passed
  • ./scripts/run_regressions.sh — passed on the merged tree committed as 8e8e3ae34f4855eeaeb6377a10e6cb2a8f410b89: bundle acceptance, 1 validator test, 6 root-workflow tests, graph self-check, 43 task-harness tests, 14 testcase-conformance tests, and 11 release tests
  • focused Standards review and independent frozen-revision Spec/semantic review of WF-01 — passed with no findings

Note

Medium Risk
Large documentation and contract migration for authority, mutation gates, and evidence chains affects how generated workflows are designed and validated, though runtime collector behavior is unchanged and regressions target structure only.

Overview
Installs two reliability contract owners — authority-and-decisions.md and evidence-and-acceptance.md — and turns SKILL.md into a short entry point with precedence, a route map, and links instead of inlined normative rules.

Shrinks and reroutes the skill bundle. Long orchestration, lifecycle, and evidence prose moves out of SKILL.md into the owners and slimmer reference modules (code-mode-script-patterns, task-lifecycle, progressive-complexity, topology-library, self-testing). Consumers must link to a single owner per contract; authority preflight runs before generic L0–L4 complexity, and workflow outcomes stay distinct from task/process verdicts.

Replaces validate_skill.py phrase checks with structural acceptance: required owner links and headings, JSON/YAML integrity, relative links, balanced fences, and Mermaid coherence. test_validate_skill.py adds negative controls (missing owners, broken links, bad graphs, etc.), and both run_regressions.sh and run_windows_regressions.ps1 run that suite after the validator. The task-collection harness test now asserts consumers link to task-lifecycle.md as the read-bounds owner.

Reviewed by Cursor Bugbot for commit 8e8e3ae. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Improvements

    • Clarified workflow guidance, authority rules, evidence requirements, lifecycle handling, escalation, validation, repair, and terminal outcomes.
    • Added clearer guidance for Code Mode scripts, topology selection, self-testing, and decision handling.
    • Strengthened documentation consistency and cross-references.
  • Bug Fixes

    • Improved skill validation for links, headings, structured data, Markdown, and Mermaid graphs.
    • Validation now supports isolated skill copies and explicit skill locations.
  • Tests

    • Added comprehensive acceptance tests covering valid bundles and common structural failures.
    • Regression scripts now run skill validation tests on supported platforms.

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_db46f02d-8e95-4a19-b030-a374f0416323)

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ce9957b-afb6-4af8-b7ca-a87dc40bc714

📥 Commits

Reviewing files that changed from the base of the PR and between 627c836 and 8e8e3ae.

📒 Files selected for processing (8)
  • scripts/run_regressions.sh
  • scripts/run_windows_regressions.ps1
  • skills/codex-graph/SKILL.md
  • skills/codex-graph/references/authority-and-decisions.md
  • skills/codex-graph/references/task-lifecycle.md
  • skills/codex-graph/scripts/task_collection_harness.test.js
  • skills/codex-graph/scripts/test_validate_skill.py
  • skills/codex-graph/scripts/validate_skill.py

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

The PR reorganizes Codex Graph reliability guidance, adds authoritative decision and evidence references, strengthens structural bundle validation, adds acceptance tests for invalid bundles, and runs those tests in Unix and Windows regression suites.

Changes

Reliability specification and validation

Layer / File(s) Summary
Authority and evidence contracts
skills/codex-graph/references/authority-and-decisions.md, skills/codex-graph/references/evidence-and-acceptance.md
Defines authority preflight, protected mutation gates, decision handling, checkpointing, evidence chains, reconciliation, acceptance manifests, and terminal outcome derivation.
Workflow selection and lifecycle
skills/codex-graph/references/progressive-complexity.md, skills/codex-graph/references/topology-library.md, skills/codex-graph/references/task-lifecycle.md, skills/codex-graph/references/self-testing.md
Scopes complexity, topology, task, and self-test behavior. Distinguishes attempt statuses from workflow outcomes.
Paired skill and script guidance
skills/codex-graph/SKILL.md, skills/codex-graph/references/code-mode-script-patterns.md, skills/codex-graph/scripts/task_collection_harness.test.js
Adds paired graph/script requirements, lifecycle and evidence rules, bounded repair, terminal reporting, and ownership-link documentation checks.
Bundle validator and regression coverage
skills/codex-graph/scripts/validate_skill.py, skills/codex-graph/scripts/test_validate_skill.py, scripts/run_regressions.sh, scripts/run_windows_regressions.ps1
Validates supplied bundle roots and structural integrity. Acceptance tests cover malformed and incomplete bundles, and both regression runners execute them.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement the two reliability owners, documentation cutover, structural validator, negative controls, and regression coverage required by issue #41.
Out of Scope Changes check ✅ Passed The documentation, validator, tests, and regression-script updates all support the objectives in issue #41, with no unrelated changes identified.
Title check ✅ Passed The title clearly identifies the primary change: installing reliability contract owners.
Description check ✅ Passed The description includes the required summary, validation, and test notes, with detailed behavior changes and test results.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch implement/wf-01

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/codex-graph/references/authority-and-decisions.md`:
- Around line 48-50: Update the “Protected-domain mutation gate” ordering to
require acceptance-capable action-path proof before mutation, covering canonical
identity, complete pre-state, authoritative action evidence, and independent
post-state capability; either list this explicit check between authorization and
mutation or define transport completeness to include it.

In `@skills/codex-graph/references/evidence-and-acceptance.md`:
- Around line 120-135: Revise the set definitions in the evidence and acceptance
guidance to distinguish overlapping lifecycle sets—authorized, inspected,
intended, attempted, receipt-resolved, and post-verified—from pairwise-disjoint
terminal outcome sets—accepted, failed, unknown, skipped, unauthorized, and
duplicate. Apply identity and count agreement requirements to terminal sets
without requiring lifecycle sets to be disjoint, preserving the rule that
mismatches cannot be accepted.
- Line 137: Update the zero-mutation acceptance rule so its second valid path
requires transport-complete discovery of the entire candidate universe, then
evidenced exclusion of every discovered candidate. Do not accept incomplete or
uncertain discovery, point reads, sampling, or aggregate totals; preserve the
transport-complete empty-set proof as the other valid path.

In `@skills/codex-graph/scripts/validate_skill.py`:
- Around line 156-160: Update require_headings to parse Markdown headings only
outside fenced code blocks, so matching lines inside literal blocks do not
satisfy requirements. Track fenced-block state while scanning the document,
validate headings from non-fenced content, and add a regression case covering a
required heading that appears only inside a code fence.
- Around line 190-205: Update the link-target handling in the validation loop to
remove angle brackets and normalize the fragment before classification; then
skip only empty anchors and actual URI schemes, while treating root-relative
paths as local and validating them against the bundle root. Add regression cases
covering a root-relative missing link and an angle-bracketed HTTPS URI.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d3a6cda5-51e2-4b32-a494-43094067b285

📥 Commits

Reviewing files that changed from the base of the PR and between 7767c6c and 627c836.

📒 Files selected for processing (13)
  • scripts/run_regressions.sh
  • scripts/run_windows_regressions.ps1
  • skills/codex-graph/SKILL.md
  • skills/codex-graph/references/authority-and-decisions.md
  • skills/codex-graph/references/code-mode-script-patterns.md
  • skills/codex-graph/references/evidence-and-acceptance.md
  • skills/codex-graph/references/progressive-complexity.md
  • skills/codex-graph/references/self-testing.md
  • skills/codex-graph/references/task-lifecycle.md
  • skills/codex-graph/references/topology-library.md
  • skills/codex-graph/scripts/task_collection_harness.test.js
  • skills/codex-graph/scripts/test_validate_skill.py
  • skills/codex-graph/scripts/validate_skill.py

Comment on lines +120 to +135
Compare these explicit sets exactly:

- authorized;
- inspected;
- intended;
- attempted;
- receipt-resolved;
- post-verified;
- accepted;
- failed;
- unknown;
- skipped;
- unauthorized; and
- duplicate.

Outcome sets are explicit and disjoint. Derive displayed counts from the sets; count agreement never substitutes for identity agreement. A mismatch cannot be accepted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Separate overlapping lifecycle sets from disjoint terminal sets.

authorized, inspected, intended, attempted, receipt-resolved, and post-verified are lifecycle sets. A target normally belongs to several of them. Only terminal outcome sets such as accepted, failed, unknown, skipped, unauthorized, and duplicate should be pairwise disjoint. State this split explicitly; otherwise enforcing Line 135 across the full list makes successful reconciliation impossible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/codex-graph/references/evidence-and-acceptance.md` around lines 120 -
135, Revise the set definitions in the evidence and acceptance guidance to
distinguish overlapping lifecycle sets—authorized, inspected, intended,
attempted, receipt-resolved, and post-verified—from pairwise-disjoint terminal
outcome sets—accepted, failed, unknown, skipped, unauthorized, and duplicate.
Apply identity and count agreement requirements to terminal sets without
requiring lifecycle sets to be disjoint, preserving the rule that mismatches
cannot be accepted.


Outcome sets are explicit and disjoint. Derive displayed counts from the sets; count agreement never substitutes for identity agreement. A mismatch cannot be accepted.

A zero-mutation outcome is accepted only after either a transport-complete empty-set proof or evidenced exclusion of every transport-completely inspected candidate. Point reads, uncertain discovery, incomplete lists, sampling, and aggregate totals do not prove a set-wide negative.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Require a complete candidate universe for zero-mutation acceptance.

The second alternative excludes every “transport-completely inspected candidate.” That condition can pass with an incomplete discovery result while undiscovered candidates remain. Require transport-complete discovery of the candidate set before accepting zero mutation. Keep the transport-complete empty-set proof as the other valid path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/codex-graph/references/evidence-and-acceptance.md` at line 137, Update
the zero-mutation acceptance rule so its second valid path requires
transport-complete discovery of the entire candidate universe, then evidenced
exclusion of every discovered candidate. Do not accept incomplete or uncertain
discovery, point reads, sampling, or aggregate totals; preserve the
transport-complete empty-set proof as the other valid path.

Comment on lines +190 to +205
for raw_target in link_pattern.findall(text):
target = raw_target.strip()
if (
not target
or target.startswith(("#", "/", "http://", "https://", "mailto:"))
):
continue
if target.startswith("<") and target.endswith(">"):
target = target[1:-1]
target = unquote(target.split("#", 1)[0])
resolved = (path.parent / target).resolve()
try:
resolved.relative_to(root)
except ValueError:
fail(f"{path.relative_to(root)} links outside the bundle: {raw_target}")
if not resolved.exists():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject root-relative links after destination normalization.

At Lines 192-200, a target that starts with / is skipped. Therefore, /references/missing.md passes although the bundle requires relative links and paths outside the bundle must fail. Also, <https://example.com> is classified before its angle brackets are removed, so it is treated as a local path. Normalize the destination first, then skip only anchors and actual URI schemes. Add regression cases for both forms.

🧰 Tools
🪛 ast-grep (0.45.0)

[warning] 193-193: Do not make http calls without encryption
Context: "http://"
Note: [CWE-319] Cleartext Transmission of Sensitive Information.

(requests-http)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/codex-graph/scripts/validate_skill.py` around lines 190 - 205, Update
the link-target handling in the validation loop to remove angle brackets and
normalize the fragment before classification; then skip only empty anchors and
actual URI schemes, while treating root-relative paths as local and validating
them against the bundle root. Add regression cases covering a root-relative
missing link and an angle-bracketed HTTPS URI.

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_3907b778-ca8a-4832-ac29-e439785c8f2e)

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_eafa8f56-502b-4619-b59c-418b29c3f45d)

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1a75e7d5-bd1e-4622-bdde-c10d5ca22164)

@jnyross
jnyross merged commit 816b6b6 into main Aug 10, 2026
2 of 4 checks passed
@jnyross
jnyross deleted the implement/wf-01 branch August 10, 2026 21:21

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment on lines +18 to +24
| Node kind | Contract purpose |
|---|---|
| work | Produce one scoped handoff or artifact |
| join | Combine declared upstream results without adding authority |
| gate | Decide one declared branch from machine-readable evidence |
| repair | Apply the one bounded correction path |
| terminal | End one graph path with its scoped result |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Workflow guide lists node categories the test-case checker does not accept

The topology guide now defines its own five node categories (| Node kind | table at skills/codex-graph/references/topology-library.md:18-24) that do not match the eight categories the test-case checker accepts, so a workflow authored from this table is rejected whenever an explicit test case is selected.

Impact: Generated workflows that follow the topology guide can fail conformance checking with an "unknown kind" error.

Conflicting role-kind vocabularies between the topology module and the conformance harness

SKILL.md:50 routes "Graph patterns and semantic-role to graph-local-node mapping" to the topology library, and the new table there enumerates work, join, gate, repair, terminal.

The authoritative kind set used by the offline matcher is ROLE_KINDS in skills/codex-graph/testcases/harness/conformance.js:35-42 (contract, discovery, writer, validator, integration, gate, repair, terminal), documented in skills/codex-graph/testcases/README.md:54-63. conformance.js:168-170 fails a contract whose role kind is outside that set, so work and join are rejected, while discovery, writer, validator, integration, and contract are missing from the topology table.

The prose immediately above the table (topology-library.md:13-16) uses the harness vocabulary (discovery, integration, validation, repair, terminal), which makes the added table the inconsistent element.

Prompt for agents
The new "Role and node kinds" table in skills/codex-graph/references/topology-library.md introduces node kinds (work, join, gate, repair, terminal) that conflict with the authoritative semantic-role kinds owned by the test-case harness (contract, discovery, writer, validator, integration, gate, repair, terminal) defined in skills/codex-graph/testcases/harness/conformance.js (ROLE_KINDS) and documented in skills/codex-graph/testcases/README.md. Because SKILL.md's route map points at the topology library for semantic-role to graph-local-node mapping, a model authoring a contract from that table can emit kinds the matcher rejects with 'unknown kind'. Either align the table with the harness kind set, or make the table explicitly non-normative and state that the testcase README/harness owns the kind vocabulary.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WF-01 — Install the two reliability owners and bundle acceptance

1 participant