Skip to content

Evaluate release contracts and paired AX scans for delivered products - #1186

Merged
xaleryb merged 51 commits into
intel:mainfrom
napetrov:feat/delivery-eval
Nov 28, 2026
Merged

xaleryb merged 51 commits into
intel:mainfrom
napetrov:feat/delivery-eval

Conversation

@napetrov

@napetrov napetrov commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

delivery release → pinned package and docs → policy checks → PASS / FAIL / INCONCLUSIVE
delivery scan    → paired source snapshots → independent verifier → AX coverage and score
delivery report  → persisted evidence → offline Markdown

Product teams supply the delivery manifest, task catalog and release policy by path. The required job uses deterministic checks in fresh containers. The separate AX replay records source delivery, attempts, false success claims and missing measurements.

Evidence

  • The good shipcalc package passes both required checks. Breaking its mandatory operation produces FAIL. Removing runner access produces INCONCLUSIVE. The fixture agent can claim success with the wrong backend and the verifier rejects its output.

  • dokimi/docs/delivery.md includes commands, example results and separate CI jobs. The demo uses a real installed executable and deterministic fixture responses.

  • A separate consumer used the published Ubuntu dc 1.07.1-3ubuntu4 package. Exact integer arithmetic passed, a controlled binary mutation truncating stdout failed (exit 1), and an unavailable Docker socket produced INCONCLUSIVE (exit 3).

  • A live one-turn Bedrock replay (claude-sonnet-5-5) completed four attempts on that package. The packaged guide alone yielded 1/2 successes and the additional Debian man page yielded 0/2. Three model replies failed the executable-answer protocol. Source reads were unobserved and attribution remains unknown.

  • The v2 one-turn harness accepts Markdown-wrapped JSON and reports protocol errors offline. On the same GNU dc pack, a fresh live Bedrock run passed 2/2 attempts in each arm. The responses were newly sampled, so the run does not identify the cause of the v1 failures.

  • All 33 delivery tests passed with a pinned non-root Docker image. The review regressions cover workspace setup, consumer exit status, Docker context, CPU and memory limits, empty corpora, truncated replies, interruption cleanup, exact starter bytes, installer output separation, malformed catalogs and offline rendering of partial artifacts.

Merge Danger

Door: Two-way for the CLI. Persisted delivery.v1 artifacts create a reader compatibility obligation.

Blast Radius: Evaluation. Adds a delivery artifact to run discovery and new CLI subcommands.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov marked this pull request as ready for review November 25, 2026 06:44
@napetrov
napetrov requested a review from a team as a code owner November 25, 2026 06:44
@github-actions github-actions Bot added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

CLI interface change detected

This PR changes dokimi's user-facing CLI surface (commands and/or options):

+ added command `dokimi delivery`
    + option `--help/-h`
+ added command `dokimi delivery release`
    + option `--help/-h`
    + option `--json`
    + option `--manifest`
    + option `--out`
    + option `--policy`
    + option `--tasks`
+ added command `dokimi delivery report`
    + argument `result`
    + option `--help/-h`
    + option `--json`
+ added command `dokimi delivery scan`
    + option `--corpus`
    + option `--fixture`
    + option `--help/-h`
    + option `--json`
    + option `--manifest`
    + option `--model`
    + option `--out`
    + option `--provider`
    + option `--tasks`
~ `dokimi runs list` parameters changed:
    ~ changed option `--kind`: choices: ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'opportunities'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"] -> ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'delivery'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'opportunities'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"]

Updated on every push; the cli-interface-change label is on while the diff is non-empty.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@exai-bot

exai-bot commented Nov 25, 2026 •

Copy link
Copy Markdown

OpenCodeReview: Commit 81d2956 was not reviewed. This PR has reached its review limit (6 reviews).

CI at `81d2956`: 7 still running, 14 passing, 3 skipped
Check Status
Fidelity golden (claude-code 2.1.318) still running
Mutation of changed lines still running
Package install smoke test (py3.11) still running
Test Linux Python 3.14 still running
Test Linux Wheels Python 3.14 still running
Tests (py3.14) still running
Windows smoke test (py3.13) still running

To review this commit: re-request review from exai-bot in the Reviewers list.

Last review (1caefb5): 2 medium

Open threads from the bot: 1

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.01990% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.21%. Comparing base (5f6bd14) to head (81d2956).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dokimi/dokimi/harnesses/delivery.py 93.48% 8 Missing and 6 partials ⚠️
dokimi/dokimi/commands/delivery.py 97.14% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1186      +/-   ##
==========================================
- Coverage   96.21%   96.21%   -0.01%     
==========================================
  Files         503      507       +4     
  Lines       67250    67653     +403     
  Branches    11678    11750      +72     
==========================================
+ Hits        64707    65091     +384     
- Misses       1568     1577       +9     
- Partials      975      985      +10     
Files with missing lines Coverage Δ
dokimi/dokimi/artifacts.py 95.91% <ø> (ø)
dokimi/dokimi/cli_flags.py 100.00% <ø> (ø)
dokimi/dokimi/cli_routes.py 97.96% <ø> (ø)
dokimi/dokimi/gate/delivery.py 100.00% <100.00%> (ø)
dokimi/dokimi/report/delivery.py 100.00% <100.00%> (ø)
dokimi/dokimi/runs/kinds.py 100.00% <ø> (ø)
dokimi/dokimi/commands/delivery.py 97.14% <97.14%> (ø)
dokimi/dokimi/harnesses/delivery.py 93.48% <93.48%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

@vlad-perevezentsev vlad-perevezentsev 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.

🟡 Changes needed · reviewed 0ad699b

To fix: a pinned image with a non-root user makes a good RC fail the release (line comments); the smaller gaps there are optional.

✅ make ci-local --offline: 28,270 passed · ✅ the docs demo with real Docker (python:3.12-slim): release PASS, scan A 10.00 / B 0.00 · ✅ test_real_delivery with DOKIMI_DELIVERY_IMAGE set: passed

The release/scan split, the pinned identities and the paired evidence links are clear and work as documented.

Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Comment thread dokimi/tests/test_delivery.py Resolved
Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Comment thread dokimi/dokimi/cli_flags.py Resolved
Comment thread dokimi/docs/documentation-index.md Resolved
Comment thread dokimi/changelog.d/20261123_delivery.md Resolved
Comment thread dokimi/docs/delivery.md Resolved
Comment thread dokimi/tests/test_cli_spend_controls.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

# Conflicts:
#	dokimi/docs/reference/cli-interface.json
Thread: PRRT_kwDOVBg7g8673Hac.a
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673Hal
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673Har
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673Hau
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673Ha3
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673Ha6
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673HbD
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673HbJ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673HbN
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673HbQ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Comment thread dokimi/dokimi/commands/delivery.py Resolved
Thread: PRRT_kwDOVBg7g868GV13
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868HHjT
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

@vchamarthi vchamarthi 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.

@napetrov, could you fix the 2 problems I found and the small thing I've marked fix before merge (in the line comments) and answer my 2 questions below? Then push and I'll take another look.

My questions before I approve:

  • A failed install (exit 120) reaches the verifier as consumer_exit=120, and the sample verifier returns 10, so the release shows FAIL for that check. Decide which it is, say it in the sentence on install commands in dokimi/docs/delivery.md, and check it in a test.
  • A manifest whose image is not a sha256 image ID, such as python:3.12-slim, gives a missing measurement on every row with the reason ValueError: runtime image needs its immutable local image ID, and a scan exits 3. Say in dokimi/docs/delivery.md which malformed manifest fields are input errors and which are missing measurements.
Optional, non-blocking (1)
  • dokimi/dokimi/gate/delivery.py:61: Two group weights of 1e308 sum to infinity, so every group weighs zero and an all-pass arm scores 0.0, not 10.0.

What I checked on 1caefb5:

  • When I broke the changed code on purpose, the tests missed 2 of 12 breakages.
  • The 303 changed tests pass, and fail on main as expected.
  • The full test suite passes with main merged in (35,538 tests), apart from failures main has too.
  • It merges cleanly onto main.

Comment thread dokimi/dokimi/gate/delivery.py Resolved
Comment thread dokimi/dokimi/harnesses/delivery.py Resolved
Comment thread dokimi/dokimi/report/delivery.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868OxIG
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868OxIO
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868OxIZ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABab4B8A.a
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABab4B8A.b
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABab4B8A.c
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABab4B8A.a
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

How should installer failures and malformed manifests be classified? Two large weights overflow.
55c64e4 documents and tests exit 120 as verifier evidence. 825a73b documents and tests exit 2 for a missing image field and exit 3 for an image tag. 299fa55 scales large weights before summing.

A product killed by SIGKILL or the 1 GiB limit, or an answer that
exits 125, was read as a Docker failure and became INCONCLUSIVE.
The consumer now runs in a subshell that prints a per-run marker
after it finishes; 125/137 count as runner failures only without it.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
…ails

A timeout, truncated capture or runner failure left evidence null,
so a stored row lost the paid model answer and could not tell a
hanging answer from a runner fault. The row now keeps the script,
captured streams and a failure kind; it stays INCONCLUSIVE.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
No test reached the release identity check: making it always false
left every delivery test green. One offline case per profile field
asserts INCONCLUSIVE with the mismatch reason; a control passes.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor
  • Ran: head 55c64e4 merged with current main, full suite on Python 3.13, ruff/mypy/bandit/growth/comment-block gates and docs check --strict, plus delivery release/scan with a real image.
  • Merged with current main, tests/test_cli_output.py::test_every_json_leaf_gives_a_next_step_or_none_by_design fails with extra leaves (delivery, release), (delivery, scan) and (delivery, report). Expected: green. Needs a main merge plus those three tuples in LEAVES_WITHOUT_NEXT_BY_DESIGN, because the delivery envelope has no next step.
  • A product that exits 125, gets SIGKILL or hits the 1 GiB OOM gives INCONCLUSIVE (exit 3). Expected: FAIL (exit 1), as exit 1 and 139 already do. Fixed by 0193945: a per-run done marker after the consumer subshell.
  • A failed consumer container stores evidence: null and loses the answer script. Fixed by 843b861.
  • fd3e10a adds the first test for the policy-identity guard. Before it, making the guard always false left every test green.
  • Left for the author: a consumer that hangs past the timeout or overflows the capture limit is still INCONCLUSIVE, while the docs say a wrong answer scores zero. Recommended: pass consumer_exit=124 with the captured head and tail.

("report", "Read a saved delivery result"),
]:
parser = leaves.add_parser(mode, help=help_text)
parser.set_defaults(func=command, cli_kind=f"delivery {mode}", emits_cli_output=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CI check Tests (py3.14) fails: Registering --json for delivery release, scan and report adds three leaves that are absent from both next-step inventory sets. Classify all three in the appropriate inventory; the command currently supplies no next_steps, but the inventory definitions reported by CI are not present in the tool-visible test file, preventing an exact verified edit.

Evidence: Log lines 885–894: inventory equality fails with extra ('delivery', 'scan'), ('delivery', 'report'), ('delivery', 'release'); 1 failed, 30313 passed.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
The delivery envelope passes no next step for release, scan or report.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
…th the verifier

A start marker before the consumer subshell separates a consumer that ran out of time
from a hung install. The verifier gets consumer_exit=124 and the captured head and tail;
an install that never reached the consumer stays inconclusive.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor
  • 931fb3e merges current main (only cli-interface.json conflicted: the runs list --kind choices now have both delivery and run).
  • aeba059 lists delivery release, report and scan in LEAVES_WITHOUT_NEXT_BY_DESIGN, because the delivery envelope has no next step.
  • b6a4a0d: a consumer that starts and then times out or writes more than 1 MiB to stdout now reaches the verifier with consumer_exit=124 and the captured head and tail, so it scores zero as docs/delivery.md says. A start marker before the consumer subshell keeps a hung install inconclusive. Stderr over the limit is kept as evidence and no longer makes the row inconclusive.
  • Ran: full suite on Python 3.13 (only the known host-only mcp test fails), lint/type/growth/comment/narrowing/timing/changelog gates, docs check --strict, and a real-Docker run of all three cases.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>

@xaleryb xaleryb 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.

Approved on b6a4a0d. delivery release/scan/report grade a delivered product against its contract; we merged main, classified the three JSON leaves, and our commits grade a consumer that exits 125/137, times out after it started or overflows stdout through the verifier (a hung install stays inconclusive) and keep the answer when its container fails. Full suite, gates and a real Docker run are green. Windows smoke had not started (the hosted Windows queue was stuck); every other check passed.

@xaleryb xaleryb 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.

Approved on 81d2956. delivery release/scan/report grade a delivered product against its contract; we merged main, classified the three JSON leaves, and our commits grade a consumer that exits 125/137, times out after it started or overflows stdout through the verifier (a hung install stays inconclusive) and keep the answer when its container fails. Full suite, gates and a real Docker run are green. Windows smoke had not started (the hosted Windows queue was stuck); every other check passed.

@xaleryb
xaleryb merged commit 1dbbeb5 into intel:main Nov 28, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli-interface-change Changes dokimi's user-facing CLI surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants