Skip to content

feat: bind per-check AI acceptance evidence to fixed gate versions - #572

Open
codezzzsleep wants to merge 17 commits into
mdiri-ai:mainfrom
codezzzsleep:acceptance-evidence-refs
Open

codezzzsleep wants to merge 17 commits into
mdiri-ai:mainfrom
codezzzsleep:acceptance-evidence-refs

Conversation

@codezzzsleep

@codezzzsleep codezzzsleep commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI acceptance reports could silently discard per-check evidence references. Checks can now optionally cite fixed gate evidence through checks[].evidenceRefs, preserving its kind, persisted ID and fingerprint. Unknown, malformed, cross-task or changed references fail before a new decision is written; desktop and cloud reviewers receive the same evidenceRefOptions contract.

Committed direct-acceptance retries also treat an omitted evidenceRefs field and an empty array as equivalent. The comparison uses a copy and preserves the stored report and single approval decision. Changes to actual references, fingerprints, evidence text, summary or verdict still conflict.

The supported gate kinds are file, url, commit, text, check and image. Existing text-only reports, attachments without reliable historical digests, assigned-reviewer separation and private execution access retain their existing behavior. No required field or migration is added. Deploy the Hub first, then the desktop; older Hub/client combinations retain text-only reports. References establish stored identity/version, rather than model judgment accuracy. Related to #428.

Validation of repair head 413dd0d2 on Linux, Python 3.12.3 and Node 22.23.5:

  • Both omitted/empty-array retry regressions fail with HTTP 409 on the original service; the real-reference change control passes. All three final regressions pass after repair with isolated SQLite and production API entry points, preserving the original report and exactly one decision.
  • The repair merges cleanly with current main 22def5d8, producing tree 98d37333. The actual release shard 205/441 executes test_acceptance_evidence_refs and reports QUALITY GATE PASSED; its loader includes all 60 desktop/cloud acceptance cases. All 22 manifest assertions and all 19 rework lifecycle cases pass on that same merge.
  • Application-wide Ruff, changed-code lint, public-source inventory, third-party inventory, paired documentation and pinned Gitleaks 8.30.1 pass. These checks cover controlled source/service fixtures; real-provider accuracy and newly installed native packages are outside this validation.
  • This follow-up changes four files: report comparison, three service regressions and paired compatibility documentation. All twelve current-head GitHub checks now pass. The backend CI log explicitly records [PASS] test_acceptance_evidence_refs (7.9s), [PASS] test_changed_lint (0.8s), [PASS] test_release_schema_history (3.5s) and QUALITY GATE PASSED.

The backend release entry retains the original desktop/cloud acceptance suites and verifies that each case is selected once. The queued-PR lint baseline repair and its regressions remain included; ordinary explicit bases, unrelated-context behavior and new violations retain their checks.

The author closed #1376 in favor of the frozen gate evidence format in #572. Each reference uses kind, ref, fingerprint and optional note.

Follow-up at e799b527

The result merges cleanly with main a47ad581. The shared task request reader displays structured dispatch conflict messages and carries the structured acceptance validation code on HTTP 422. The regression covers both responses and their retry semantics.

Linux validation on the combined current-main tree passed 288 focused desktop tests and 120 focused Hub tests. Public source, third-party, documentation and pinned secret checks passed on this PR branch.

Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 19:00

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Resolve the overlap with upstream PR mdiri-ai#683 while preserving its canonical workspace journal and named-script capture. Carry the exact current-main delivery helper and lifecycle regressions so the current-main integration retains the existing behavior.

Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
@codezzzsleep

Copy link
Copy Markdown
Contributor Author

Updated the original branch to 688c5162, with upstream 976e97ad integrated and the overlapping acceptance changes resolved. All twelve current-head checks pass.

The backend CI log explicitly records [PASS] test_acceptance_evidence_refs (5.8s), [PASS] test_changed_lint (0.6s) and QUALITY GATE PASSED; the evidence regressions now run in the full release gate. Workflow files and lint rules remain unchanged from upstream. The PR description includes compatibility coverage, the Hub-before-desktop upgrade order and the remaining real-provider/native-package limits.

Could you please review the updated implementation when convenient?

@codezzzsleep

codezzzsleep commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

I reviewed #1376 at d89bce3c, which follows the additive first step discussed in #428. It and #572 currently define different wire formats for checks[].evidenceRefs:

I ran four valid fingerprintless #1376-style examples through the actual #572 validator: all four return HTTP 422 with invalid_kind. Legacy free-text reports remain accepted. A native merge preview of the two current PR heads also reports a content conflict in task_acceptance_review.py; #572's individual current-main merge remains clean.

Please coordinate one public representation and its upgrade behavior before both changes are combined. If #1376 is accepted as the persistence/shape-validation first step, #572's frozen-version verification should target that accepted contract as a focused follow-up. Reports saved by the first step need explicit read, review and reuse coverage after the follow-up; they must retain their meaning without being silently discarded or assigned invented verified fingerprints.

Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
Signed-off-by: Ci Nie <codezzzsleep@gmail.com>
tanbopiao added a commit to tanbopiao/SoduWork that referenced this pull request Nov 29, 2026

This branch has not been deployed

No deployments
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.

2 participants