Repository navigation
docs(ops): SRE re-audit addendum — Rust memory safety + CI sequencing (2026-04-27) - #257
Closed
cursor[bot] wants to merge 1 commit into
Closed
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
… (2026-04-27) Slack-triggered re-evaluation of the 2026-04-27 Dependency Guardian ledger under a Rust-memory-safety + complex-CI lens. Verdicts unchanged; this addendum books the reasoning gaps the original ledger did not enumerate: - A1 (Low): Bound<'py, T> API surface vs FastFilter usage — confirmed pyo3 0.24 migration is mechanical, not semantic. PR #226 still MERGE. - A2 (Low-Med): Send + Sync posture under freethreaded CPython 3.13t not stated for #[pyclass] FastFilter — proposes #[pyclass(frozen)] follow-up *after* PR #255 lands the cargo test baseline. - A3 (Medium): no Rust workflow on main at audit time — every CI green signal on a Cargo bump came from Python-side jobs only. Mitigation already in flight as PR #255 (cargo check + test + clippy -D warnings). Recommended sequence (handed back to maintainer): land #255 first, then #226 with real Rust evidence. Original ledger merge order otherwise unchanged. Audit-and-block respected — no commit pushed to any audited Dependabot branch. Doctrine: DEFENSIVE_SCANNING_MANIFESTO §1 clauses 1-4 still hold (Cargo path; zero DB connector touch). THE_ART_OF_THE_FALLBACK §4 diagnostic- on-fall applied to the documentation surface itself — append, do not overwrite the dated ledger. Co-authored-by: Fabio Tavares Leitão <[email protected]>
1 of 3 tasks
FabioLeitao
force-pushed
the
main
branch
2 times, most recently
from
May 3, 2026 17:52
ae0da8d to
b5c995c
Compare
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
Slack-triggered re-evaluation of the merged 2026-04-27 Dependency Guardian ledger (PR #242) under a sharper lens: Rust memory safety and complex CI logic. Adds a single dated addendum under
docs/ops/sre_audits/. Verdicts on the five Dependabot PRs (#221/#222/#223/#224/#226) are unchanged; what's new is the explicit booking of three reasoning gaps the original ledger did not enumerate.The addendum is filed as a separate dated file (not a v2 of the ledger) per the folder's
README.mdrule that dated decisions are immutable snapshots — same posture asTHE_ART_OF_THE_FALLBACK.md§4 diagnostic-on-fall: append, don't overwrite.Why this re-audit, in plain terms (Julia Evans style)
The original ledger correctly called PR #226 (
pyo3 0.23.5 → 0.24.1) a MERGE. The reasoning was thin in one place: it leaned on "we don't callPyString::from_object" as the safety case. That's necessary but not sufficient for a CPython extension that lives on the detector hot path.Three things were under-examined:
Bound<'py, T>API surface vs our usage.Send + Syncposture under freethreaded CPython 3.13t not stated forFastFilter.#[pyclass(frozen)]opt-in after PR #255 lands.cargo test/cargo clippyonmainat audit time — every Rust-bump green signal came from Python-side jobs only.ci(rust): GitHub Actions for boar_fast_filter + unit tests).A1 inspected the actual call sites (
#[pymodule] fn boar_fast_filter(_py: Python<'_>, m: &Bound<'_, PyModule>),Vec<String>in /Vec<usize>out, noPy<PyModule>/&PyModuledeprecated path, regex compile errors mapped toPyRuntimeErrorbefore thepyclassmaterialises, zerounsafeblocks). pyo3 0.24's tightenedBound-API rules and thePyString::from_objectUB advisory both miss our paths.A2 noted that
FastFilteris semantically immutable (regex compiled once in#[new], only&selfmethods after) but the type system does not record that intent. Without#[pyclass(frozen)], PyO3 inserts aRefCell-equivalent borrow check on every&selfcall — small CPython 3.13t hot-path overhead worth tightening once we have a Rust CI baseline to measure against.A3 is the complex-CI-logic axis. The original ledger called PR #226 "all green (Test 3.12 / 3.13 / Lint / Bandit / Semgrep / CodeQL / SonarQube / Dependency audit / SBOM / Analyze)" — true, but every one of those workflows is Python-side. There is no
rust-ci.ymlonmaintoday. PR #255 fixes that.Recommended sequence (re-ordered vs the original §4)
main, converts every future Rust bump from "Python-side smoke only" to "real Rust evidence".cargo test+cargo clippy --all-targets --all-features -- -D warnings.Defensive-architecture statement (mandatory protocol gate)
Per the trigger ("ZERO impact on database locks; no regressions"):
WITH (NOLOCK)/ sampling / isolation level / DDL.pyo3andregex; no DB driver.frozen-class follow-up is internal to the detector prefilter; does not cross the customer-DB boundary.DEFENSIVE_SCANNING_MANIFESTO.md§1 clauses 1–4 still hold for every PR re-audited.Note on the trigger's model request
The Slack message asked for "Claude 3.5 Opus or your highest tier model." The runtime cannot self-select a different model mid-task — this re-evaluation runs on Claude Opus 4.7 (highest tier currently exposed to this automation). The technical re-audit underneath the request is what this PR delivers; called out in the Slack reply for transparency.
Files
docs/ops/sre_audits/RUST_MEMORY_SAFETY_AND_CI_ADDENDUM_2026-04-27.md— full addendum (TL;DR, memory-safety re-audit per call site,Send + Syncposture, CI evidence sequencing, defensive-architecture re-statement, provenance).docs/ops/sre_audits/README.md— folder index updated with the new dated row.Verification
uv run pytest tests/test_markdown_lint.py tests/test_docs_pt_br_locale.py tests/test_confidential_commercial_guard.py tests/test_pii_guard.py tests/test_docs_external_no_plan_links.py→ 145 passed.Operational constraint
Audit-and-block respected. No commit pushed to any of the audited Dependabot branches (#221, #222, #223, #224, #226). The maintainer keeps full control of when to merge each.
Doctrine references
docs/ops/inspirations/DEFENSIVE_SCANNING_MANIFESTO.md§1 clauses 1–4 — acceptance gate.docs/ops/inspirations/THE_ART_OF_THE_FALLBACK.md§4 — diagnostic-on-fall applied to the documentation surface itself (append, don't overwrite the dated ledger).docs/ops/sre_audits/DEPENDENCY_GUARDIAN_VERDICT_LEDGER_2026-04-27.md— the dated ledger this addendum extends.