Skip to content

feat(v0.11): CI verification gate on the audit trail - #10

Merged
azank1 merged 2 commits into
mainfrom
az/ft/audit-gate-v0.11
Jul 5, 2026
Merged

azank1 merged 2 commits into
mainfrom
az/ft/audit-gate-v0.11

Conversation

@azank1

@azank1 azank1 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the one real portability gap in the v0.10 audit trail (commit_sha + loopllm audit): episodes live in a local ~/.loopllm/ SQLite store, which does not exist on a CI runner.

  • loopllm audit --export <path> writes the (optionally --since-filtered) episode list as a portable JSON artifact (default .loopllm/audit.json) so it can be committed alongside the code it verifies.
  • loopllm audit-gate --since <ref> [--min-score X] [--require-verified] reads that artifact back and checks every non-merge commit in the range against it.
    • Report-only by default (always exits 0) — a team can dogfood the report before opting into enforcement via either flag.
    • --require-verified fails commits with no matching record.
    • --min-score fails commits below the threshold (and commits with no record).
  • commits_since() in project_scope.py gained a no_merges option — a merge commit isn't itself something an agent wrote and verified.
  • Reusable composite action .github/actions/loopllm-gate + workflow .github/workflows/loopllm-gate.yml wire the gate into this repo's own PRs in report-only mode, and can be dropped into another repo's workflow directly.

This is the concrete payoff of the "trust + audit layer for engineering teams" positioning: a PromptLoop verification record becomes something CI can actually check.

Test plan

  • pytest -q — 294 passed, 4 skipped
  • ruff check src/ tests/ — clean
  • mypy --strict src/loopllm/ — clean
  • Manually smoke-tested loopllm audit --export + loopllm audit-gate end to end in a scratch git repo (report-only pass, --require-verified fail on missing record, --min-score fail on low score, pass once exported)
  • tests/test_cli_audit_gate.py (9 tests) + test_commits_since_no_merges_excludes_merge_commits in tests/test_project_scope.py
  • CI green on this PR (includes the new loopllm-gate.yml workflow running against itself, report-only)

Made with Cursor

Closes the one real portability gap in the v0.10 audit trail: episodes
live in a local ~/.loopllm/ SQLite store, which doesn't exist on a CI
runner. `loopllm audit --export <path>` writes the (optionally
--since-filtered) episode list as a portable JSON artifact instead, so
it can be committed alongside the code it verifies.

`loopllm audit-gate --since <ref> [--min-score X] [--require-verified]`
reads that artifact back and checks every non-merge commit in the
range against it. Report-only by default (always exits 0) so a team
can dogfood the report before opting into enforcement via either flag.

Ships as a reusable composite action (.github/actions/loopllm-gate)
plus a workflow that runs it against this repo's own PRs in
report-only mode — the concrete "trust + audit layer for teams" payoff
the v0.10 commit_sha/audit-trail work set up.

commits_since() gained a no_merges option (a merge commit isn't itself
something an agent wrote and verified).

Tests: tests/test_cli_audit_gate.py (export round-trip, report-only vs
enforced modes, --min-score, merge-commit exclusion, bad-ref handling)
plus a no_merges unit test in test_project_scope.py. 294 tests pass,
ruff/mypy --strict clean.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_de662920-8580-4160-b021-d9be498540f4)

Action metadata (action.yml) is parsed independently of the calling
workflow, so it can't resolve the `github` context — GitHub's action
manifest loader tried to evaluate the ${{ github.event... }} example
left in the `since` input's description text and failed with
"Unrecognized named-value: 'github'", breaking every job that uses
this composite action, including this repo's own loopllm-gate.yml.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_0de9f9c5-56ae-4a86-bc98-678226209b9f)

@azank1
azank1 merged commit c472969 into main Jul 5, 2026
8 checks passed
@azank1 azank1 mentioned this pull request Jul 5, 2026
3 of 4 tasks
azank1 added a commit that referenced this pull request Aug 1, 2026
* feat(v0.11): CI verification gate on the audit trail

Closes the one real portability gap in the v0.10 audit trail: episodes
live in a local ~/.loopllm/ SQLite store, which doesn't exist on a CI
runner. `loopllm audit --export <path>` writes the (optionally
--since-filtered) episode list as a portable JSON artifact instead, so
it can be committed alongside the code it verifies.

`loopllm audit-gate --since <ref> [--min-score X] [--require-verified]`
reads that artifact back and checks every non-merge commit in the
range against it. Report-only by default (always exits 0) so a team
can dogfood the report before opting into enforcement via either flag.

Ships as a reusable composite action (.github/actions/loopllm-gate)
plus a workflow that runs it against this repo's own PRs in
report-only mode — the concrete "trust + audit layer for teams" payoff
the v0.10 commit_sha/audit-trail work set up.

commits_since() gained a no_merges option (a merge commit isn't itself
something an agent wrote and verified).

Tests: tests/test_cli_audit_gate.py (export round-trip, report-only vs
enforced modes, --min-score, merge-commit exclusion, bad-ref handling)
plus a no_merges unit test in test_project_scope.py. 294 tests pass,
ruff/mypy --strict clean.


* fix: remove github-context expression from action.yml description

Action metadata (action.yml) is parsed independently of the calling
workflow, so it can't resolve the `github` context — GitHub's action
manifest loader tried to evaluate the ${{ github.event... }} example
left in the `since` input's description text and failed with
"Unrecognized named-value: 'github'", breaking every job that uses
this composite action, including this repo's own loopllm-gate.yml.


---------
@azank1
azank1 deleted the az/ft/audit-gate-v0.11 branch August 1, 2026 00:10
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.

1 participant