Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
35af34f
test(ci): require two Runtime runner allocations
seonghobae Aug 21, 2026
ac2c55b
fix(ci): combine coverage gates on one runner
seonghobae Aug 21, 2026
1ac3c73
fix(ci): restore complete combined coverage workflow
seonghobae Aug 21, 2026
6970bc9
docs(ci): record active runtime coverage reconciliation
seonghobae Aug 21, 2026
b884519
style(ci): apply pinned rustfmt
seonghobae Aug 21, 2026
bdf22f0
chore(ci): reconcile SBOM runner fix from main
seonghobae Aug 21, 2026
4c044fe
test(ci): preserve branch evidence after line failure
seonghobae Aug 21, 2026
e4a5afa
fix(ci): keep branch coverage observable after line failure
seonghobae Aug 21, 2026
28a1982
test(ci): require branch-generation failure diagnostics
seonghobae Aug 21, 2026
e53c552
fix(ci): diagnose branch coverage generation failures
seonghobae Aug 21, 2026
f6428a0
test(ci): require line coverage generation diagnostics
seonghobae Aug 21, 2026
4163e25
fix(ci): diagnose line coverage generation failure
seonghobae Aug 21, 2026
bf5d8cb
test(ci): preserve coverage check identities under runner pressure
seonghobae Aug 21, 2026
946f54d
test(ci): require failed-line handoff without cancel hang
seonghobae Aug 21, 2026
34210da
fix(ci): serialize coverage without renaming required checks
seonghobae Aug 21, 2026
c156b90
test(ci): align runner contract with serialized coverage jobs
seonghobae Aug 21, 2026
0aeedcd
docs(ci): describe serialized coverage without check renames
seonghobae Aug 21, 2026
fd790e8
docs(ci): drop stale single-runner traceability claim
seonghobae Aug 21, 2026
0be7c7e
docs(ci): preserve traceability file ending
seonghobae Aug 21, 2026
eae034f
fix(ci): format serialized coverage contract
seonghobae Aug 21, 2026
d2c1b76
chore(ci): reconcile serialized Runtime CI with current main
seonghobae Aug 24, 2026
f4653cf
chore(ci): reconcile serialized Runtime CI with latest main
seonghobae Aug 25, 2026
ac328ea
Merge branch 'main' into ci/runtime-coverage-single-runner-main-20260821
seonghobae Aug 25, 2026
df537ca
Merge branch 'main' into ci/runtime-coverage-single-runner-main-20260821
opencode-agent[bot] Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,17 @@ jobs:
- name: Verify cargo-llvm-cov version
run: cargo llvm-cov --version | grep -F "$CARGO_LLVM_COV_VERSION"
- name: Generate line coverage
id: line_coverage_generation
run: cargo llvm-cov --json --summary-only --output-path coverage.json
- name: Enforce complete line coverage
id: line_coverage_gate
if: ${{ !cancelled() && steps.line_coverage_generation.outcome == 'success' }}
run: python3 scripts/check_coverage.py coverage.json --kind lines
- name: Diagnose line coverage generation failure
if: ${{ !cancelled() && steps.line_coverage_generation.outcome == 'failure' }}
run: echo "::error::line coverage generation failed before the coverage gate"
- name: Diagnose missing line coverage
if: failure()
if: failure() && steps.line_coverage_gate.outcome == 'failure'
Comment thread
seonghobae marked this conversation as resolved.
Resolved
run: |
python3 - <<'PY'
import json
Expand Down Expand Up @@ -194,6 +200,8 @@ jobs:

branch-coverage:
name: Production branch coverage
needs: line-coverage
if: ${{ always() && !cancelled() }}
Comment thread
seonghobae marked this conversation as resolved.
Resolved
runs-on: ubuntu-latest
timeout-minutes: 15
Comment thread
seonghobae marked this conversation as resolved.
Resolved
services:
Expand Down Expand Up @@ -229,11 +237,17 @@ jobs:
- name: Verify cargo-llvm-cov version
run: cargo +nightly-2026-08-18 llvm-cov --version | grep -F "$CARGO_LLVM_COV_VERSION"
- name: Generate branch coverage
id: branch_coverage_generation
run: cargo +nightly-2026-08-18 llvm-cov --branch --json --summary-only --output-path coverage-branches.json
- name: Enforce complete branch coverage
id: branch_coverage_gate
if: ${{ !cancelled() && steps.branch_coverage_generation.outcome == 'success' }}
run: python3 scripts/check_coverage.py coverage-branches.json --kind branches
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Resolved
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- name: Diagnose branch coverage generation failure
if: ${{ !cancelled() && steps.branch_coverage_generation.outcome == 'failure' }}
run: echo "::error::branch coverage generation failed before the coverage gate"
- name: Diagnose missing branch coverage
if: failure()
if: failure() && steps.branch_coverage_gate.outcome == 'failure'
Comment thread
seonghobae marked this conversation as resolved.
Resolved
Comment thread
seonghobae marked this conversation as resolved.
Resolved
Comment thread
seonghobae marked this conversation as resolved.
Resolved
run: |
python3 - <<'PY'
import json
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ All notable product and architecture changes are recorded here. Releases use imm

### Fixed

- **Active PR #288 only:** Runtime CI preserves the long-lived `Production line coverage` and `Production branch coverage` check identities while serializing branch coverage behind line coverage. At most rust-quality plus one coverage job request hosted runners concurrently; a failed line job still hands off to branch coverage unless the workflow is cancelled. Exact-head checkout, immutable service images, ephemeral credentials, exact 100% gates, and scoped generation/gate diagnostics remain intact. This is not protected-main or release evidence until the PR's unchanged current head passes the required workflows and independent review.
- Stale shorter assessment-session command history now fails closed instead of rewinding the current-state projection, so a later Pause/Resume still reloads after a rejected Activate-only persist.
- Same-enrollment longitudinal ingest now keeps a later iOS copy and a later Android ping as distinct source identities instead of treating them as a rewrite of the first row.
- Outbox delivery-lease expiry recovery now classifies liveness from the PostgreSQL clock, so a future caller timestamp cannot steal a still-live exclusive lease.
Expand Down
2 changes: 2 additions & 0 deletions docs/TRACEABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Still-Target logical modules/adapters include remaining product aggregate persis

**Active PR** #86 anonymous-session resource authorization, plus follow-up #104, #118, #135, #144, #159, and honesty successor #225 that compare the verified actor to the supplied participant tenant/owner and session and apply a lifecycle command only after that check, is not protected-main truth until an unchanged reviewed/check-clean head is integrated. The command entry point does not accept a caller-built `ResourceScope` and does not claim the aggregates were store-loaded. Persist/reload of `assessment_participant` remains Target. Append-only identity-link history persist remains a later slice. HTTP transport remains outside this slice. Persist-backed session HTTP, exclusive outbox delivery leases, longitudinal observation clocks/membership, and claim-next scoring-job poll are already on protected main.

**Active PR** #288 is the current-protected-main landing vehicle for the Runtime CI allocation remedy. It keeps independent Rust quality checks while combining line and branch coverage on one PostgreSQL-backed runner, preserving both exact 100% coverage gates, exact pull-request-head checkout, immutable PostgreSQL image, ephemeral credentials, and scoped failure diagnostics. This operational/recovery evidence is not protected-main truth until the unchanged current-base head passes all required workflows and qualifying independent review; #286 remains historical predecessor evidence.

## 5. ADR traceability by concern

| Concern | Governing ADR(s) |
Expand Down
26 changes: 26 additions & 0 deletions tests/ci_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ const CI_WORKFLOW: &str = include_str!("../.github/workflows/ci.yml");
const RUST_TOOLCHAIN: &str = include_str!("../rust-toolchain.toml");
const DEPENDABOT: &str = include_str!("../.github/dependabot.yml");

#[test]
fn runtime_ci_preserves_check_identities_and_limits_peak_fanout() {
assert_eq!(CI_WORKFLOW.matches("runs-on: ubuntu-latest").count(), 3);
assert!(CI_WORKFLOW.contains("\n line-coverage:\n name: Production line coverage\n"));
assert!(CI_WORKFLOW.contains(
"\n branch-coverage:\n name: Production branch coverage\n needs: line-coverage\n if: ${{ always() && !cancelled() }}\n"
));
assert!(!CI_WORKFLOW.contains("\n coverage:\n"));
}

#[test]
fn every_checkout_is_bound_to_the_pull_request_head() {
let exact_head_ref = "ref: ${{ github.event.pull_request.head.sha || github.sha }}";
Expand Down Expand Up @@ -78,6 +88,22 @@ fn lockfile_failure_evidence_is_scoped_to_the_lock_gate() {
);
}

#[test]
fn coverage_jobs_preserve_both_exact_gates() {
assert!(CI_WORKFLOW.contains("id: line_coverage_gate"));
assert!(CI_WORKFLOW.contains("id: branch_coverage_gate"));
assert!(CI_WORKFLOW.contains("if: failure() && steps.line_coverage_gate.outcome == 'failure'"));
assert!(
CI_WORKFLOW.contains("if: failure() && steps.branch_coverage_gate.outcome == 'failure'")
);
assert_eq!(
CI_WORKFLOW
.matches("cargo install cargo-llvm-cov --locked --version \"$CARGO_LLVM_COV_VERSION\"")
.count(),
1
);
}

#[test]
fn coverage_failures_identify_the_incomplete_source_files() {
assert!(CI_WORKFLOW.contains("INCOMPLETE_FILE"));
Expand Down
50 changes: 50 additions & 0 deletions tests/ci_serial_coverage_contract.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//! Regression contract for capacity-aware coverage scheduling.
//!
//! Runtime CI must reduce peak hosted-runner pressure without renaming the two
//! long-lived coverage check identities. Branch coverage therefore waits for
//! the line-coverage job, but still runs after a line-coverage failure unless
//! the workflow was cancelled. Generation failures remain explicit operator
//! diagnostics rather than silently skipped evidence.

const CI_WORKFLOW: &str = include_str!("../.github/workflows/ci.yml");

#[test]
fn coverage_jobs_preserve_their_check_identities() {
assert!(CI_WORKFLOW.contains("\n line-coverage:\n name: Production line coverage\n"));
assert!(CI_WORKFLOW.contains("\n branch-coverage:\n name: Production branch coverage\n"));
assert!(!CI_WORKFLOW.contains("name: Production line and branch coverage"));
}

#[test]
fn branch_coverage_is_serialized_without_becoming_fail_open() {
assert!(CI_WORKFLOW.contains(
"\n branch-coverage:\n name: Production branch coverage\n needs: line-coverage\n if: ${{ always() && !cancelled() }}\n"
));
assert_eq!(CI_WORKFLOW.matches("runs-on: ubuntu-latest").count(), 3);
}

#[test]
fn line_generation_failure_has_operator_diagnostics() {
assert!(CI_WORKFLOW.contains(
"- name: Generate line coverage\n id: line_coverage_generation"
));
assert!(CI_WORKFLOW.contains(
"- name: Diagnose line coverage generation failure\n if: ${{ !cancelled() && steps.line_coverage_generation.outcome == 'failure' }}"
));
assert!(CI_WORKFLOW.contains(
"::error::line coverage generation failed before the coverage gate"
));
}

#[test]
fn branch_generation_failure_has_operator_diagnostics() {
assert!(CI_WORKFLOW.contains(
"- name: Generate branch coverage\n id: branch_coverage_generation"
));
assert!(CI_WORKFLOW.contains(
"- name: Diagnose branch coverage generation failure\n if: ${{ !cancelled() && steps.branch_coverage_generation.outcome == 'failure' }}"
));
assert!(CI_WORKFLOW.contains(
"::error::branch coverage generation failed before the coverage gate"
));
}
Loading