dev → main: v0.2.0 release promotion - #17
Open
gnanirahulnutakki wants to merge 813 commits into
Open
Conversation
gnanirahulnutakki
added a commit
that referenced
this pull request
May 26, 2026
…o/sigs.k8s.io/controller-runtime-0.24.0 deps(go)(deps): bump sigs.k8s.io/controller-runtime from 0.23.3 to 0.24.0 in /go
This was referenced Jun 23, 2026
This was referenced Jun 29, 2026
When a governed session has denials, the human-readable summary now shows which tools were blocked (up to 5 unique names, with a +N more suffix), so the user does not have to open receipts to find out. The full deduplicated list is also available in --json output as summary.denied_tools. 11 new focused tests cover: single/multiple tools shown, absent when no denials, truncation at 5, order preservation, line positioning, and deduplication.
…it codes Two DX fixes from the 2026-08-08 CLI probe: 1. _summary_for_json was missing denied_tools — the just-landed denied-tools feature (d94b899) added it to the human-readable summary and the CHANGELOG claimed it was in --json output, but _summary_for_json only extracted 7 fields and was not updated. 2. Signal-killed processes produced raw negative exit codes (e.g. -9 for SIGKILL) that sys.exit() wrapped to unexpected values (247 instead of 137). Now normalized to POSIX 128+signal.
The new denied_tools field added to _summary_for_json() in cdc05e6 was missing from the strict-set assertion in test_summary_does_not_leak_internal_fields, causing a regression. Production code was correct; only the test assertion needed updating.
The governance summary now shows a parenthesised hint next to non-zero exit codes so users can understand why the agent exited without knowing POSIX signal conventions: agent exit 137 (killed by SIGKILL) agent exit 1 (non-zero exit) Signal exits (128+signum) are decoded using the stdlib signal module. Other non-zero codes show 'non-zero exit'. Zero/None show no hint. 17 new tests in test_exit_code_hint.py covering signal decoding, edge cases (127, 128, negative, unknown signal numbers), and format_summary integration.
The top-level JSON result from 'ardur run --json' (to_result_dict) previously included exit_code but not exit_signal or exit_hint. Programmatic consumers (CI pipelines, scripts) had to reimplement signal-name detection or dig into process_lifecycle to determine whether a non-zero exit was a signal kill. This adds two fields: - exit_signal: POSIX signal name (e.g. 'SIGKILL') or null - exit_hint: human-readable string (e.g. 'killed by SIGKILL') Both handle raw negative exit codes (pre-normalization) and POSIX-conventional 128+signal codes. 12 new tests in TestJsonExitSignalAndHint cover zero exit, positive non-zero, signal kills (SIGKILL/SIGTERM/SIGSEGV/SIGUSR1), raw negative, redact_paths preservation, and field-presence regression.
Two CI failures from the previous commit: 1. test_exit_signal_for_posix_high_signal assumed signal 30 is SIGUSR1, but on Linux CI it is SIGPWR. Switched to SIGTERM (15) which is portable across macOS and Linux. 2. test_contains_all_expected_fields in test_run_json_output.py used exact key-set equality and did not include the new exit_signal and exit_hint fields. Added both to the expected key set.
The UNKNOWN verdict (added for honest observation-gap abstention) was silently omitted from the offline verification summary counts. Receipts with verdict='unknown' mapped correctly to decision='UNKNOWN' via _verdict_label, but the summary only had three counters (permit_count, deny_count, error_count), so unknown receipts were invisible in aggregate reports — permit+deny+error < receipt_count. Also fixed the reason_code fallback: when a receipt had no explicit internal_denial_code, both 'unknown' and 'violation' verdicts fell through to 'insufficient_evidence', mislabeling observation gaps as transient operational failures. Changes: - offline_verification.py: add unknown_count to summary; add _default_reason_code() with verdict-specific defaults (unknown→observation_gap, violation→policy_denied); show UNKNOWN in CLI render when non-zero - execution-receipt-v0.1.schema.json: add 'unknown' to the conditional enum requiring denial reasons, matching v0.2 schema - test_offline_verification.py: update exact-dict assertions for new key - test_offline_verification_unknown_count.py: new regression tests Found by adversarial verdict-taxonomy sibling-sweep review. Signed-off-by: Gnani Rahul <89947795+gnanirahulnutakki@users.noreply.github.com>
Adds --output to 'ardur run' to write the governance run result JSON to a file, matching the --output contract on every other report-producing command (verify, posture, preflight, telemetry, evidence correlate). Works with or without --json: without --json, the human-readable summary goes to stderr and the JSON goes to the file; with --json, both stderr and the file receive JSON. When combined with --redact-paths, the file content has local paths replaced with stable placeholders. 9 new tests covering: file write, json+output combo, summary+output mode, nested directories, file permissions (0600), redact-paths integration, content parity between file and stderr, unwritable path handling, and empty string rejection.
…ng guard Review t_1fec1367 found two LOW non-blocking issues in 6e5c9e2: 1. --output help text said '(requires --json)' but the feature works without --json; corrected to '(works with or without --json)' 2. --redact-paths warning fired even when --output was actively redacting the file content; tightened guard to check for both --json AND --output before warning Added 2 regression tests covering the warning guard.
…, codex-app-server-report Three adapter report commands had --json but no --output, making them the only report-producing commands without file-writing support. Every other report command (verify, posture, preflight, telemetry, evidence correlate, run) already had --output. The new flag uses the same atomic owner-only writer (_write_json_report_to_file) and returns a success JSON with output path and report_sha256 digest. 13 new focused tests covering: subparser flag existence, valid file write, empty/whitespace rejection, directory rejection, and end-to-end argparse + handler wiring for all three commands.
Add --redact-paths to claude-code-report, gemini-cli-report, and codex-app-server-report. The flag replaces local absolute paths in the JSON/file output with stable placeholders, matching the established pattern from run, status, doctor, and protect claude-code. It affects both --json stdout and --output file content. A stderr warning is emitted when --redact-paths is given without --json or --output. 12 new tests cover flag existence, json redaction, output file redaction, warning behavior, and e2e wiring for all three commands.
…y export, posture scan, posture report, and preflight tool-server Adds --redact-paths flag to 6 CLI commands that have --output but lacked the flag, following the exact same pattern already used by claude-code-report, gemini-cli-report, codex-app-server-report, and run. - Argparse flag added after --output in each subparser - Handler logic with warning when used without --json/--output - Tests: 16 tests covering flag existence, warning emission, and JSON redaction - Docs: CHANGELOG and cli.md usage blocks updated - Source mirrors regenerated via sync_source_docs.py
Resolve 27 CodeQL quality alerts (20 py/import-and-import-from, 7 py/unused-import) across 4 test files added with the --output and --redact-paths feature flags. - Move function-level `import vibap.cli as cli` to module level in test_adapter_report_output_flag.py, test_adapter_report_redact_paths.py, and test_remaining_redact_paths.py (21 local imports removed). - Remove unused imports (os, tempfile, subprocess, Path, pytest) from test_run_output_flag.py and test_adapter_report_output_flag.py. Behavior-preserving: monkeypatch.setattr(cli, ...) patches the module object identically whether the import is module-level or function-level. 52 tests pass, all import-related ruff rules clean.
The signed attestation JWT historically carried only permits and denials. The honest-abstention verdict breakdown (unknowns, insufficient_evidence, violations, denied_tools) existed only in the unsigned governance summary dict — an auditor verifying only the signed JWT could not see why a session was non-compliant or which tools were blocked. Now the full verdict breakdown is passed into extra_claims inside issue_attestation_for_session, making it independently verifiable from the signed token alone without trusting the unsigned summary. 6 files (+69): proxy.py (+13), test_attestation_verdict_breakdown.py (NEW, 3 tests), test_attestation_verdict_rollup.py (NEW, 3 tests), CHANGELOG + source mirror. 3121 passed, 35 skipped, 0 failures. check-local GREEN. sync_source_docs GREEN. gen-agent-docs-check GREEN.
- Remove unused MissionPassport/GovernanceProxy imports (CodeQL #409/#410) - Remove unused sys import from test_issue_keys_dir_oserror - Remove unused _MAX_DESCANDANT_COUNT import from test_process_lifecycle - Remove unused unittest.mock import and f-string prefix from test_protect_redact_paths - Rename ambiguous 'l' to 'ln' in test_exit_code_hint (E741) All changes are behavior-preserving lint cleanup. Signed-off-by: Gnani Rahul <89947795+gnanirahulnutakki@users.noreply.github.com>
…estation JWT verification The signed attestation JWT carries the verdict breakdown (unknowns, insufficient_evidence, violations, denied_tools) as of 75dcd0f. However, the verify command only handled passport JWTs (--token), offline journals, anchor bundles, and receiver envelopes — there was no CLI path to verify a behavioral attestation JWT after issuance. The new --attestation-token flag closes this gap. An auditor can now run 'ardur verify --attestation-token <jwt>' to independently confirm cryptographic integrity and inspect all signed claims including the verdict breakdown. Supports --output for file-writing and --redact-paths for path-safe output, matching the established verify --token pattern. 9 new tests covering: happy path (with/without verdict breakdown), --output file writing, --redact-paths, malformed JWT, wrong key, missing keys dir, mutual exclusion with --token, and updated error message for no-input case.
The last three JSON-producing CLI commands that lacked --output and --redact-paths. Now every JSON-producing command supports writing the response to an owner-only file and replacing local absolute paths. The flags share a new _handle_output_and_redact terminal helper that encapsulates the output/redact/warn/print logic previously duplicated across individual command handlers. The anchor command preserves its ok-based exit code via an optional exit_code parameter. 19 focused tests cover all three commands (parser, output, redact, warning, helper) plus the shared helper unit tests. 3150 passed, 35 skipped, 0 failures (full suite). check-local --quick GREEN. sync_source_docs GREEN. gen-agent-docs-check GREEN.
|
|
||
| import hashlib | ||
| import json | ||
| import os |
…oken verify --attestation-token error paths (malformed token, wrong key, missing/invalid public key) previously reused the passport error code invalid_passport_token, passport-oriented messages, and next_steps pointing to ardur verify --token / ardur issue. This was confusing for an auditor verifying a behavioral attestation JWT who has no passport. Now the three error response helpers accept a label parameter that switches to attestation-specific error codes (invalid_attestation_token, attestation_public_key_missing, attestation_public_key_invalid) and attestation-oriented next_steps pointing to ardur verify --attestation-token / ardur attest. The passport path is unchanged: verify --token still returns invalid_passport_token with passport-oriented next_steps.
_safe_exception_message() stripped the intentional, user-safe messages from
OfflineVerificationError and TelemetryExportError, returning only the raw
class name ("OfflineVerificationError") with zero diagnostic value. The
--token / --attestation-token paths had rich error responses with next_steps,
but the journal/offline path showed only "message": "OfflineVerificationError".
Now _safe_exception_message recognises these domain types alongside
TransparencyError and KeyDirectoryError, preserving messages like "offline
verification input was not found" and "journal line 1 is not a bounded
compact JWS". 11 regression tests added.
| import inspect | ||
| import json | ||
|
|
||
| import pytest |
The _safe_exception_message() function sanitizes generic exceptions to their class name to avoid leaking filesystem paths or Python internals. PyJWTs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes the current
devbranch tomainas the human-gatedv0.2.0release candidate. At the current head,devis 524 commits ahead ofmain;mainis an ancestor ofdev, with zero reverse-only commits, so this remains a forward-only promotion.The existing immutable
v0.1.0tag remains at00c8d7eb88b0cc98cc8f65f8bfcca94491db5b9a. It will not be moved or rewritten. PR #245 prepared package, runtime, proxy, lock, and OCI documentation metadata at0.2.0. A freshv0.2.0tag and GitHub Release remain deferred to #147 after this promotion.Current release scope
This release does not claim universal kernel enforcement for unknown or uncooperative agents. Remaining unknown-agent attach and independent-corpus work stay explicitly tracked.
Current evidence — 2026-07-12
dev/ PR head:eb63d22361c45621df7c04884ee978b9bf0195c3.origin/mainatce7ac316320b7b37ad03bf21a045c95126e45becis an ancestor oforigin/dev; 524 forward commits and zero reverse-only commits.devSHA verification: all 17 workflows successful, including Python 3.10/3.13, Go, CodeQL, package/wheel smoke, OCI, docs/links/formats/secrets, Linux governance benchmark, BPF generation, KVM kernel smoke, seccomp smoke, and strictardur run --enforceseccomp E2E.proxy.golang.orgHTTP/2 reset during module download; failed-job attempt 2 passed on the unchanged SHA.v0.1.0tag is unchanged; nov0.2.0tag or GitHub Release exists.Promotion gates
devcontains prepared0.2.0release metadata.mainancestry is clean and forward-only.CHANGELOG.md[0.2.0]section on the actual release date and adds the matching-version validation before final approval.devupdate.mainchecks are green.v0.2.0tag and GitHub Release at the promotedmainSHA.Approval boundary
Branch protection requires one human approving review. Automated work must not supply or bypass that approval. Stale reviews are dismissed when
devadvances, so approval must apply to the final head after #272 is stamped on the real release date. Current headeb63d22361c45621df7c04884ee978b9bf0195c3has zero approvals.Related: #140, #147, #189, #191, #272, #79.