Skip to content

Forbid unsafe workspace-wide, alert on process death, run Docker tests in CI#127

Merged
weiminglong merged 1 commit into
mainfrom
feat/hardening-bundle
Jul 6, 2026
Merged

Forbid unsafe workspace-wide, alert on process death, run Docker tests in CI#127
weiminglong merged 1 commit into
mainfrom
feat/hardening-bundle

Conversation

@weiminglong

Copy link
Copy Markdown
Owner

Summary

Three independent hardening gaps, one pass:

  • Workspace lint policy: [workspace.lints.rust] unsafe_code = "forbid", inherited by every crate ([lints] workspace = true). pb-types alone overrides to deny for its four SAFETY-documented from_utf8_unchecked serializer sites, each #[allow]-scoped and miri-verified in CI. Verified by a negative probe (an unsafe block in pb-book fails compilation). Policy recorded in SECURITY.md.
  • Liveness alerts: total process death was invisible — rate()/increase() over an absent series evaluates to an empty vector, so every existing alert goes quiet exactly when the process dies. TargetDown (up == 0 for 1m, critical) and IngestAbsent (absent ingest series, belt-and-braces for job-label drift) close the hole, with three new promtool incident scenarios (fires-on-incident + does-not-fire-on-healthy) and RUNBOOK.md sections.
  • integration-docker CI job: the #[ignore]d Docker-backed cases — 5 ClickHouse roundtrips, 3 Parquet-vs-ClickHouse cross-backend equivalence tests, the MinIO S3 roundtrip — now run on every PR via testcontainers (ubuntu runners ship Docker). This was the suite's strongest consistency evidence and it never ran in CI. TESTING.md matrix row 7 flips to covered and the known-gaps entry is removed.

Verification

  • Negative lint probe compiled-and-failed as expected; full workspace tests green under the new lint config; clippy/fmt clean
  • Alert rules and unit tests will be validated by the monitoring CI job (promtool check + test, amtool routing asserts — critical routes to pagerduty-critical unchanged)
  • The new CI job's first live run is on this PR — watch for testcontainers flakiness; single-threaded to avoid port clashes

…s in CI

Three hardening gaps closed in one pass:

The workspace now carries [workspace.lints.rust] unsafe_code = "forbid",
inherited by every crate; pb-types alone overrides to deny for its four
SAFETY-documented from_utf8_unchecked serializer sites, each #[allow]-
scoped and miri-verified in CI. Ten of eleven crates are provably
unsafe-free at compile time; SECURITY.md records the policy.

Total process death was the one failure mode no alert could see:
rate()/increase() over an absent series returns an empty vector, so
FeedSilent and friends all go quiet exactly when the process dies.
TargetDown (up == 0 for 1m) and IngestAbsent (absent ingest series)
close that hole, with promtool incident tests and runbook sections.

The #[ignore]d Docker-backed integration cases — ClickHouse roundtrips,
Parquet-vs-ClickHouse cross-backend equivalence, and the MinIO S3
roundtrip, the strongest consistency evidence in the suite — now run on
every PR in a new integration-docker CI job via testcontainers.
TESTING.md's matrix row and known-gaps section are updated accordingly.
@weiminglong
weiminglong force-pushed the feat/hardening-bundle branch from 4e3fa3d to 7a40414 Compare July 6, 2026 12:59
@weiminglong
weiminglong merged commit a427343 into main Jul 6, 2026
20 checks passed
@weiminglong
weiminglong deleted the feat/hardening-bundle branch July 6, 2026 13:12
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