Skip to content

feat: reappraise retained synthetic evidence for #199 - #334

Draft
dinakarjs wants to merge 5 commits into
agentrust-io:mainfrom
dinakarjs:docs/199-current-acceptance-profile
Draft

dinakarjs wants to merge 5 commits into
agentrust-io:mainfrom
dinakarjs:docs/199-current-acceptance-profile

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

A previously passing synthetic result can outlive its scenario, policy, trust inputs, dependencies or evidence-age budget. This adds a caller-trusted offline reappraisal utility beside the #199 harness: unchanged current inputs remain applicable; changed inputs, expired evidence and non-passing historical outcomes require reassessment with explicit reasons.

The runner retains the full scenario digest and original observation time privately. Public result and observation serialization use explicit field lists and copied mutable values; the public schema rejects private reuse metadata. EvidenceSnapshot retains the binding and original observation time for pairing and expiry checks. Snapshot data, digests and object representations are private local state, not public evidence.

This utility does not authenticate snapshots or timestamps, discover dependencies, persist revocations, dispatch work or authorize execution. Existing public field values remain caller-controlled: this is a bounded public projection, not an arbitrary-input sanitizer. No hardware, live-host, independent-custody or #199 completion claim. Hardware work remains parked under WCM #200.

Validation of the source published at 16c25531a824c9300a1cbc2712dcdb4ded56f5db, Python 3.12.14:

  • From the harness directory: python -m unittest discover -s tests -q and its python -O counterpart: 57 tests pass each.
  • From the repository root: python -m pytest tests -q: 28 tests pass.
  • ruff check --target-version py39 --select E4,E7,E9,F integrations/agentrust-confidential-workflow-harness and git diff --check: pass.
  • Eight public-projection tests cover candidate matching over synthetic ALPHA/BRAVO/CHARLIE values; all four terminal statuses; private binding and expiry; future result/observation fields; and mutation isolation. Substituting the original serializer in process causes six assertion failures and zero errors. Valid retention and pairing controls remain intact.

Following Imran's 23 October routing instruction, the repair is on this existing branch for review. The four original change trees were replayed unchanged to add missing DCO trailers to my first two commits; all five resulting commits are signed off. No other author's history was rewritten.

Draft status remains until independent review and current-head checks are satisfied. Refs #199. Prepared with OpenAI Codex; no self-approval or merge.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 17, 2026
@dinakarjs dinakarjs changed the title docs: add reusable informative acceptance profile for #199 feat: reappraise retained synthetic evidence for #199 Oct 17, 2026
@dinakarjs
dinakarjs marked this pull request as ready for review October 18, 2026 04:19

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head cbd5e4f40e8ef85b9fdbb24e8b2a04acdc9bd625. The 41 harness tests pass, and I ran paired positive controls plus randomized scenario/context/time checks. Two negative controls still allow a historical synthetic result to be reported as applicable without a corresponding fresh run. The scope is local, caller-trusted evidence; these are correctness issues in the stated reappraisal behavior, not claims about authenticated production evidence. Please bind the retained result to the scenario it actually evaluated and to its original run/observation time, with regressions for both cases.

_check_time(captured_at)
if not isinstance(context, EvaluationContext):
raise ValueError("explicit evaluation context required")
if (scenario.scenario_id, scenario.transaction_id, scenario.claim) != (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Bind the result to the full scenario evaluated by the runner. This check compares only ID, transaction ID and claim. I ran a passing result from the baseline with a same-ID scenario whose workload input changed; a fresh runner call refused the changed scenario, but capture(changed_scenario, old_result, ...) succeeded and appraise returned applicable. The current hash then records the supplied scenario rather than the one the result came from. Please retain/check a scenario digest at run time, or explicitly make correct result-to-scenario pairing a caller obligation and limit the applicability claim accordingly.

reasons.append("trust_changed")
if dict(snapshot.context.dependencies) != dict(current.dependencies):
reasons.append("dependencies_changed")
if evaluated_at < snapshot.captured_at:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Base evidence age on when the result was observed, separately from when a snapshot object was created. Re-capturing the same old RunResult with captured_at=1000 makes it applicable at evaluation time 1001 with a ten-second budget, while its original snapshot at time 100 is expired. An honest delayed capture can therefore refresh historical evidence without a new run. Please carry the original run/observation time into the snapshot and add a delayed-capture regression.

Copy link
Copy Markdown
Contributor Author

Addressed both reappraisal findings in 0c7e518c16d52f6f4d6f1b06e1bf43164a7da427.

The runner now records a digest of the full scenario and the original observation timestamp at run entry. Capture checks that digest, rejects missing/invalid observation metadata and refuses capture before observation. Appraisal measures evidence age from the retained observation time, so delayed capture cannot refresh it. Legacy results lacking these fields require a fresh run. The optional timestamp remains caller-trusted fixture input; hashes are not authentication.

Regressions pair a passing original scenario with same-ID changed workload input, exercise mutable scenario input, contrast delayed old-result capture with a genuinely fresh run, and reject invalid/future/missing metadata. All 44 harness tests and 28 repository tests pass; Ruff and whitespace checks pass. Isolated removal of the full-scenario guard causes 2 failures; reverting age to capture time causes 1 failure. Published tree equals tested tree 345a282c9aa36b2e63ee26e845fffc689f609df7. Please re-review; no live acceptance or #199 closure claimed.

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed exact head 0c7e518c16d52f6f4d6f1b06e1bf43164a7da427. Thank you for the focused fix: the two earlier reappraisal failures are resolved. All 44 harness tests pass; independent randomized controls rejected 900 same-ID scenario changes and exercised 1,000 observation/capture/expiry cases successfully.

One new contract failure blocks approval. A normal passing HarnessRunner().run(...).to_dict() now includes scenario_digest and observed_at, while the published result.schema.json sets additionalProperties: false and defines neither field. JSON Schema validation therefore rejects the runner's own result (the independent check also covered refused, unknown and incomplete results). Please update the schema with the intended types and legacy/required-field behavior, then add a regression that validates emitted results against it. The current CI jobs pass apart from the expected maintainer-approval gate, but they do not catch this producer/schema mismatch. This remains a local synthetic-evidence review, not a live or #199 acceptance decision.

limitations: list[str]
package_versions: dict[str, str] = field(default_factory=dict)

scenario_digest: str | None = None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These fields are now included by RunResult.to_dict() on every run, but result.schema.json rejects both because it has additionalProperties: false and no matching properties. A passing positive-control result fails schema validation. Please add typed schema entries, choose whether legacy serialized results may omit them, and test the actual runner output against the schema.

@dinakarjs dinakarjs Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@noah-ing fixed in aff9e7eeeb0741ef898d2888645dae9a0c2bd360. The schema now defines the exact lowercase SHA-256 identity and non-negative integer observation time, requires the pair together when either is supplied, and continues accepting legacy serialized results with both absent. Legacy RunResult.to_dict() omits null defaults; EvidenceSnapshot.capture still rejects legacy results for reuse.

New tests validate actual emitted passed/refused/unknown/incomplete results, schema well-formedness, zero-time control, legacy serialization/refusal, partial metadata, invalid values and unknown-field rejection. All 50 harness tests pass normally and under -O; 28 repository tests pass; Ruff and whitespace pass. Restoring the old schema causes 5 assertion failures; removing metadata constraints causes 12. Published tree equals tested tree 7f548c6937c0a99f83b04f68dc783742acf08afc. The existing CI installs hash-pinned jsonschema and discovers the new test module; README local setup now uses that same dependency file.

All 11 current-head technical workflow runs, including CodeQL, now succeed. Please re-review this exact head. Formal re-review request returned connector HTTP 403, so this inline handoff records the request; independent maintainer acceptance remains separate.

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed exact head aff9e7eeeb0741ef898d2888645dae9a0c2bd360. The schema/producer mismatch from my last review is fixed: the published Draft 2020-12 schema now accepts actual emitted results, rejects partial or invalid metadata, and preserves the documented legacy pair behavior. I ran all 50 harness tests locally; an independent seeded sweep validated 2,000 runner outputs across all four terminal statuses. Technical CI is green apart from the separate maintainer-approval gate.

I am requesting changes on a separate confidentiality concern in the newly public result metadata. I filed a private pre-merge report with a synthetic reproduction through this repository's security-advisory channel, per SECURITY.md. Please have a named maintainer assess and resolve that report, including a regression for the documented public-result privacy boundary, before merging this head. I am keeping the reproduction out of the public PR discussion. This is a conditional issue in a caller-trusted synthetic harness; I have not found real protected-data exposure or a released affected version.

This review is limited to the local synthetic harness and is not the independent maintainer approval or full #199 acceptance.

@dinakarjs
dinakarjs marked this pull request as draft October 18, 2026 15:40

Copy link
Copy Markdown
Contributor Author

@carloshvp @imran-siddique — #334 is now draft. Please coordinate assessment of Noah’s private report and provide access or an approved private repair route.

An unpublished candidate passes 53 harness tests and 28 repository tests, but has not been checked against the confidential cases. The review hold remains pending that verification and independent acceptance.

@imran-siddique

Copy link
Copy Markdown
Member

@dinakarjs added you to GHSA-gqxr-h639-qxch, the advisory for noah-ing's privacy finding on this PR, and it now has a private fork. Please put your candidate fix and a regression for the public-result privacy boundary there. This stays a draft until the fix lands.

Copy link
Copy Markdown
Contributor Author

Self-review against the saved contribution guidelines (R34), 21 October 2026, public head aff9e7eeeb0741ef898d2888645dae9a0c2bd360: two earlier commits in this PR's four-commit range lack Signed-off-by trailers: 39a648bf7ac770eb3d4328d1437ea5884804cc04 and cbd5e4f40e8ef85b9fdbb24e8b2a04acdc9bd625. Both carry our contributor email. The signed follow-up commits do not repair those earlier omissions.

Record this as a contribution-policy action for the coordinated revision: certify our own commits, preserve and verify the intended content/tree, and refresh exact-head checks and independent review after any history rewrite. I have left this public branch unchanged while the existing private assessment and draft hold remain in force. This administrative finding does not resolve or disclose the private report, and self-review supplies no independent approval.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
… inputs

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
Signed-off-by: Srinivasa Dinakar <78673153+dinakarjs@users.noreply.github.com>
Validate emitted terminal results and preserve metadata-free legacy serialization.
Require paired typed metadata when present, while refusing legacy reappraisal.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
Retain private scenario binding and observation age while using explicit public projections. Add candidate-matching, status, future-field and mutation-isolation controls.

Prepared with OpenAI Codex.
Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
@dinakarjs
dinakarjs force-pushed the docs/199-current-acceptance-profile branch from aff9e7e to 16c2553 Compare October 24, 2026 21:47

Copy link
Copy Markdown
Contributor Author

The repair is now on this branch at 16c25531a824c9300a1cbc2712dcdb4ded56f5db, following Imran's routing instruction. Public serialization excludes private reuse metadata while local snapshots retain scenario binding and observation age. 57 harness tests pass normally and under -O; 28 root tests, Ruff and whitespace checks pass. Restoring the original serializer causes six assertion failures with no errors. The six published changed files match the tested bytes. I also added the missing DCO trailers to my first two commits by replaying the four original change trees unchanged; all five current commits are signed off. The PR description now reflects the final behavior. Please re-review this exact head; draft status and independent acceptance remain. Prepared with OpenAI Codex.

Copy link
Copy Markdown
Contributor Author

@noah-ing @carloshvp requesting re-review at repaired head 16c2553, following the 23 October instruction to use this existing branch. The current public projection excludes the private metadata; the description names the normal/-O suites and failing-old-serializer controls. The older blocking review predates this head and needs independent disposition. Reviewer-assignment API returned 403; this is a request in the conversation, not a successful formal assignment. Draft retained. Hosted link/example failures are separate inherited Nobulex/OpenSSL blockers; no successful end-to-end, hardware or full #199 acceptance is claimed.

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 16c25531a824c9300a1cbc2712dcdb4ded56f5db. The reappraisal, schema and public-result boundary concerns from my prior review are addressed for this caller-trusted synthetic harness. Independent public-projection, snapshot pairing and evidence-age controls passed across all four terminal statuses. The harness suite passed both normally and under -O (57/57 each); repository tests passed (28/28), and Ruff and whitespace checks are clean. This supersedes my earlier changes request, so I approve this bounded code repair. The PR remains a draft: hosted links, WCM example and maintainer gates, plus independent broader #199 acceptance, remain outstanding. This review makes no live, hardware or full #199 acceptance claim.

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

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants