8000 T107 — Prove that the log bep serve writes is the log min box audit reads by minimal-foundry[bot] · Pull Request #2789 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"contextRegion":{"crumbs":[{"crumb_type":"organization","label":"gominimal","is_root":false,"href":"/gominimal"},{"crumb_type":"repository","label":"minimal","is_root":false,"href":"/gominimal/minimal"}],"localNavigation":[{"id":"code","icon":"code","label":"Code","href":"/gominimal/minimal","selectedLinks":["repo_source","repo_downloads","repo_commits","repo_releases","repo_tags","repo_branches","repo_packages","repo_deployments","repo_attestations"],"popoverTarget":false,"commandId":"repositories:go-to-code","reactNav":{"appTarget":"code-view","anchor":"code-view-repo-link"},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"issues","icon":"issue-opened","label":"Issues","href":"/gominimal/minimal/issues","selectedLinks":["repo_issues","repo_labels","repo_milestones"],"count":240,"popoverTarget":false,"commandId":"repositories:go-to-issues","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"pull-requests","icon":"git-pull-request","label":"Pull requests","href":"/gominimal/minimal/pulls","selectedLinks":["repo_pulls","checks"],"count":31,"popoverTarget":false,"commandId":"repositories:go-to-pull-requests","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"discussions","icon":"comment-discussion","label":"Discussions","href":"/gominimal/minimal/discussions","selectedLinks":["repo_discussions"],"popoverTarget":false,"commandId":"repositories:go-to-discussions","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"actions","icon":"play","label":"Actions","href":"/gominimal/minimal/actions","selectedLinks":["repo_actions"],"popoverTarget":false,"commandId":"repositories:go-to-actions","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"security-and-quality","icon":"shield","label":"Security and quality","href":"/gominimal/minimal/security","selectedLinks":["security","overview","alerts","policy","token_scanning","code_scanning"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-security","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"insights","icon":"graph","label":"Insights","href":"/gominimal/minimal/pulse","selectedLinks":["repo_graphs","repo_contributors","dependency_graph","dependabot_updates","pulse","people","community"],"popoverTarget":false,"commandId":"repositories:go-to-insights","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}}],"localNavigationUpdateChannel":null,"selectedLink":"repo_pulls"},"owner":null,"headerLogo":{"href":"/","aria-label":"Homepage "},"notifications":{"indicatorMode":"disabled","websocketChannel":null,"fetchIndicatorSrc":"/notifications/indicator","fetchIndicatorEnabled":false},"issues":{"href":"/issues"},"pulls":{"href":"/pulls"},"contributedRepos":{"href":"/repos"},"copilot":{"show":false,"showAgentsButton":false,"showRelaunchAnnouncement":false,"copilotChatUrl":null,"copilotApiUrl":"https://api.githubcopilot.com"},"search":{"show":true,"showCommandPalette":false,"isSearchPage":false,"isJumpToSearch":false,"searchContext":{"scope":"repo:gominimal/minimal","current_repo_name":"minimal","current_repo_nwo":"gominimal/minimal","current_repo_org":"gominimal","user_id":"gominimal"}},"commandPalette":null,"enterpriseBar":{"show":false},"globalTransactionalMessage":[],"payloadsUrl":"/_global-navigation/payloads.json?can_toggle_site_admin_and_employee_status=0\u0026is_admin_mode_on=0\u0026is_ui_opted_out=0\u0026show_ui_opt_out=0\u0026v=8","contextRegionUrl":"/_global-navigation/context-region.json"}}

T107 — Prove that the log bep serve writes is the log min box audit reads - #2789

Merged
norrietaylor merged 1 commit into
mainfrom
agent/2460-prove-that-the-log-bep-serve-writes-is-the-log-m
Oct 31, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
agent/2460-prove-that-the-log-bep-serve-writes-is-the-log-m

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T107 — Prove that the log bep serve writes is the log min box audit reads

slice: S15
kind: task
covers: BEP-068
size: S
est: 0 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: min box audit <box> lists the records that bep serve wrote to audit-<n>.jsonl under ~/.minimal/bep/audit
observability: the proxy's start line names the active segment, as today
layers:
- serve:
- crates/bep/src/main.rs: a test starts the audit log as bep serve does (start_audit_log over a directory), appends a record, and reads it back with LogReader::read_new over the same directory, under the audit-<n>.jsonl name (#2460)
test: cargo nextest run -p bep serve_writes_audit_segments_the_reader_reads
produces: none
consumes: none
proof: A record bep serve appends is read back by the reader min box audit uses, from audit-.jsonl in the same directory.
depends on:
- blocked by #2290

Original issue text

Residual of #2457 (T17, epic #1501). Named by minimal-arch condition C3(1) on 7c3c46a.

Nothing in the tree writes the audit log to the layout the reader expects. #2457 fixes that layout on the read side: segments named audit-<n>.jsonl (bep::audit::segment_name) under bep::audit::default_dir() (~/.minimal/bep/audit), read in order of n, the highest n the active segment, a segment never renamed. The T9 writer (#2262, merged in #2361) opens an append-only log at a caller-supplied path, and no proxy task names this directory or this segment name yet.

The proxy (T10 #2271, T18 #2275) must open its log under default_dir() as audit-0.jsonl, and the BEP-068 segment rotator (T33 #2290) must open each new segment as audit-<n+1>.jsonl in the same directory without renaming the old one, or min box audit reads nothing.

Done when: the proxy's production audit sink writes audit-<n>.jsonl under bep::audit::default_dir(), the BEP-068 rotator keeps that naming, and a test proves LogReader::read_new on default_dir() returns the records the proxy wrote.


Generated by Claude Code

Proof

The test serve_writes_audit_segments_the_reader_reads in crates/bep/src/main.rs starts the audit log with start_audit_log, as bep serve does. It appends a record. It then reads th 8000 at same record back from audit-0.jsonl in the same directory with LogReader::read_new, the reader that min box audit uses.

Notes from the agent: Test-only change. cargo clippy -p bep --all-targets and cargo fmt --check are clean.

Tests

line exit tail
cargo nextest run -p bep serve_writes_audit_segments_the_reader_reads 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-6732... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/workbench/crates/client-config) Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test

Verify

min task run agent-verify passed ([tasks.verify]).

Closes #2460

The test starts the audit log as bep serve does, appends a record, and
reads it back from audit-0.jsonl with the LogReader that min box audit
uses. Refs #2460.
@coderabbitai
coderabbitai Bot commented Oct 31, 2026
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d92cb0ee-c831-499a-950e-2cf02cfc4f1f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Oct 31, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at f94d79f8c62d.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none.

@minimal-arch minimal-arch Bot 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.

arch-review: PASS · the full ruling

The change conforms. The new test proves that the record bep serve writes through start_audit_log is the record that LogReader::read_new returns. That reader is the one min box audit uses, over the same audit-<n>.jsonl layout. This agrees with architecture.md line 505: min box audit reads the helper's own hash-chained log. I found no condition.

Ruled at f94d79f against gominimal/arch@8640f85e193d by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment
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.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 31, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at f94d79f against T107's plan block. serve_writes_audit_segments_the_reader_reads starts the log through start_audit_log, the function bep serve uses. It appends one decision and reads it back with audit::LogReader::new(&dir).read_new(), the same reader min box audit uses (crates/minimal/src/cmd/box_audit.rs:32). It pins the segment name audit-0.jsonl, zero skipped lines, exactly that segment, and the record equal to the written one. That covers the plan's proof. It does not cover the box-id spelling mismatch (#2462, T103): the test uses the same box-serve string on both sides. That stays T103's. No findings.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit ca6d27d Oct 31, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2460-prove-that-the-log-bep-serve-writes-is-the-log-m branch October 31, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T107 — Prove that the log bep serve writes is the log min box audit reads

1 participant

0