Skip to content

feat(work-items): verify artifacts before completion - #3939

Merged
haelyra merged 2 commits into
mainfrom
feat/verified-tool-outcomes-20261115
Nov 19, 2026
Merged

haelyra merged 2 commits into
mainfrom
feat/verified-tool-outcomes-20261115

Conversation

@affaan-m

@affaan-m affaan-m commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

A work item can currently reach a completion status without evidence that its artifact satisfies the task. This adds opt-in verification contracts registered when a task is created: an independent check records success, failure, or unknown, and only success completes the contracted item.

The first validator, harness-adapter-documentation/v1, checks the canonical Markdown adapter matrix. This establishes documentation consistency, not whether the adapters themselves executed successfully.

Behavior

  • Add work-items upsert --verify ... --artifact ... and work-items verify, using the existing SQLite store and session identities.
  • Bind each receipt to the task, owner, session, contract, validator reference, and inspected bytes. Preserve failed attempts when a subsequent repair succeeds.
  • Enforce contracts centrally for CLI and board mutations. A failed completion recheck records the failure, blocks the task, returns CLI exit 1, and returns board HTTP 409 with ok:false.
  • Preserve the lifecycle of existing uncontracted work and label it unverified in CLI output.
  • Limit verification to a registered checker and bounded regular Markdown files; reject traversal and symlink artifacts. Add no dependencies or arbitrary command execution.
  • Document the tool-layer contract and its limits. Refresh the derived skill-registry digest and generated Pi skill mirror for the changed harness-construction skill.

Validation

  • Focused regression run: 384 passed, 0 failed across 17 files covering work items, state store, control pane, and harness-adapter compliance.
  • Repository component validators passed. Pi generation check passed; the source and generated skill match byte for byte after fixing CI-detected mirror drift.
  • New verifier coverage: 97.38% lines, 90.65% branches, 100% functions.
  • ESLint: zero errors, four complexity warnings in the CLI/server functions. Changed Markdown and git diff --check passed.
  • Independent code and security reviews found no remaining blockers. Independent review also exercised concurrent verification history.
  • Live local CLI acceptance on commit 1028ff65a5d9e4a532310473db6eaa1eef615df4: missing artifact → unknown/blocked; invalid artifact → failure/blocked; manual close rejected; repair → verified/done; post-success regression → failed completion recheck/blocked; repair → verified/done. A separate CLI process reread all five linked attempts from SQLite. No provider calls.

Scope

This is local artifact evidence, not remote attestation. It does not add a scheduler, executor, FocusQueue adapter, automatic repair, dataset export, model training, or production deployment. A local database/code owner can alter the record. Total task cost, tokens, and intervention counts are not measured by these receipts.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Security Evidence

Commit: 1028ff65a5d9e4a532310473db6eaa1eef615df4

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 11 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / PR Risk Taxonomy

Commit: 1028ff65a5d9e4a532310473db6eaa1eef615df4

PR taxonomy review recommended (neutral)

Detected 6 PR taxonomy bucket(s): Harness Drift, Install Manifest Integrity, CI/CD Recommendation, Reference Set Validation, Skill Quality, Agent Config Review.

Scanned 11 changed file(s).

Roadmap taxonomy buckets:

Harness Drift

Harness-facing changes can drift across Claude Code, Codex, OpenCode, and shared adapter surfaces.

Signals:

  • 1 harness-facing path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Install Manifest Integrity

Install manifests, plugin metadata, and shipped skills should stay synchronized with user-facing setup guidance.

Signals:

  • 1 install or manifest path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • 2 CI or workflow path(s) changed

Paths:

  • tests/lib/work-item-verification.test.js
  • tests/scripts/control-pane.test.js

Reference Set Validation

AI, analyzer, skill, agent, command, and harness guidance changes should be compared against a maintained eval, golden trace, benchmark, or reference set.

Signals:

  • AI or harness analysis changes may ship without reference-set validation
  • 1 reference-sensitive path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Skill Quality

Skill, agent, command, and rule guidance should carry examples, triggers, validation, or reference evidence.

Signals:

  • Skill or agent guidance may ship without quality evidence
  • 1 skill-quality path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Agent Config Review

Agent, command, skill, MCP, and local instruction changes should be reviewed as executable agent configuration.

Signals:

  • 1 agent-config path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Reference Set Readiness

Commit: 1028ff65a5d9e4a532310473db6eaa1eef615df4

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 11 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Present scripts/lib/harness-adapter-compliance.js
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Hosted Promotion Readiness

Commit: 1028ff65a5d9e4a532310473db6eaa1eef615df4

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 11 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

const open = fs.openSync;
fs.openSync = function (filename, ...args) {
if (filename === canonicalArtifact) { fs.unlinkSync(artifact); makeFifo(); }
return open.call(fs, filename, ...args);
@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Security Evidence

Commit: 080bfd714b933f13b01c886180965e074df536f9

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 12 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / PR Risk Taxonomy

Commit: 080bfd714b933f13b01c886180965e074df536f9

PR taxonomy review recommended (neutral)

Detected 6 PR taxonomy bucket(s): Harness Drift, Install Manifest Integrity, CI/CD Recommendation, Reference Set Validation, Skill Quality, Agent Config Review.

Scanned 12 changed file(s).

Roadmap taxonomy buckets:

Harness Drift

Harness-facing changes can drift across Claude Code, Codex, OpenCode, and shared adapter surfaces.

Signals:

  • 1 harness-facing path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Install Manifest Integrity

Install manifests, plugin metadata, and shipped skills should stay synchronized with user-facing setup guidance.

Signals:

  • 1 install or manifest path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • 2 CI or workflow path(s) changed

Paths:

  • tests/lib/work-item-verification.test.js
  • tests/scripts/control-pane.test.js

Reference Set Validation

AI, analyzer, skill, agent, command, and harness guidance changes should be compared against a maintained eval, golden trace, benchmark, or reference set.

Signals:

  • AI or harness analysis changes may ship without reference-set validation
  • 1 reference-sensitive path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Skill Quality

Skill, agent, command, and rule guidance should carry examples, triggers, validation, or reference evidence.

Signals:

  • Skill or agent guidance may ship without quality evidence
  • 1 skill-quality path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Agent Config Review

Agent, command, skill, MCP, and local instruction changes should be reviewed as executable agent configuration.

Signals:

  • 1 agent-config path(s) changed

Paths:

  • skills/agent-harness-construction/SKILL.md

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Reference Set Readiness

Commit: 080bfd714b933f13b01c886180965e074df536f9

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 12 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Present scripts/lib/harness-adapter-compliance.js
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Hosted Promotion Readiness

Commit: 080bfd714b933f13b01c886180965e074df536f9

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 12 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@haelyra
haelyra merged commit 2105d32 into main Nov 19, 2026
21 of 28 checks passed
@haelyra

haelyra commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Thank you for verifying work-item artifacts before completion. We merged your original commit history through #4048 so the related changes could be tested together. The maintainer pass preserves the FIFO replacement regression and asserts observed nonblocking/no-follow flags outside error handling.

The resulting main commit fbb1a85c59a8468c96454fc5b48cf7e4f8f79b55 passed CI, CodeQL, and Supply-Chain Watch. Thank you for helping improve ECC!

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.

3 participants