Skip to content

feat(rta): hierarchical IRQ-aware RTA with jitter and BCET/WCET split (Track A commit 2/4)#147

Merged
avrabe merged 1 commit intomainfrom
feat/v0.7.0-hierarchical-rta
Apr 25, 2026
Merged

feat(rta): hierarchical IRQ-aware RTA with jitter and BCET/WCET split (Track A commit 2/4)#147
avrabe merged 1 commit intomainfrom
feat/v0.7.0-hierarchical-rta

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 24, 2026

Summary

v0.7.0 Track A commit 2 of 4. Implements hierarchical IRQ-aware RTA per the design in #146.

What's in

What's explicitly NOT in

  • PIP/PCP blocking (deferred to v0.7.1)
  • Multi-processor ISR migration (deferred)
  • Lean convergence proof for the jittered recurrence (commit 3)
  • COMPLIANCE.md final wording updates (commit 4) — only the in-progress bullet was narrowed

Critical non-regression

no_isrs_matches_classical_rta asserts byte-identical output for models without any Spar_Timing::* property. It is run first in the test plan.

Test plan

  • cargo test -p spar-analysis — all green (791 lib + 3 fixture tests)
  • Existing RTA tests unchanged in output (non-regression gate passes)
  • Fixture snapshots match committed .expected.json
  • cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo fmt --all -- --check clean
  • rivet validate PASS

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 96.76898% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-analysis/src/rta.rs 96.91% 15 Missing ⚠️
crates/spar-analysis/src/scheduling_verified.rs 95.71% 3 Missing ⚠️
crates/spar-analysis/src/property_accessors.rs 96.82% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Extends response-time analysis with an ISR tier above the classical
task-priority fixed-point. ISRs identified by Spar_Timing::ISR_Priority
steal CPU capacity first; residual capacity feeds task RTA. Tindell-
Clark jitter terms (Dispatch_Jitter) inflate the recurrence in the
standard way. Compute_Execution_Time's Time_Range is consumed as
(BCET, WCET) — only WCET enters the recurrence; both emerge in a
ResponseBand diagnostic for v0.8.0 trace comparison.

New diagnostics: IrqResponseBudget, IrqBudgetViolated,
IsrOverloadedCpu, MissingBottomHalfServer, ResponseBand.

Non-regression: models with no Spar_Timing::* properties produce
byte-identical RTA output to the prior implementation (verified by
no_isrs_matches_classical_rta).

Out of scope (v0.7.1): priority inheritance / ceiling protocols;
multi-processor ISR migration.

Track A commit 2 of 4. Precedes Lean convergence sketch (commit 3)
and integration + COMPLIANCE final wording (commit 4).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the feat/v0.7.0-hierarchical-rta branch from f9282e0 to 6841c14 Compare April 24, 2026 21:16
@avrabe avrabe merged commit 659de5e into main Apr 25, 2026
13 checks passed
@avrabe avrabe deleted the feat/v0.7.0-hierarchical-rta branch April 25, 2026 04:33
avrabe added a commit that referenced this pull request Apr 25, 2026
)

Adds proofs/Proofs/Scheduling/RTAJittered.lean stating monotonicity
and least-fixed-point convergence of the jittered response-time
recurrence implemented as compute_response_time_jittered in PR #147.

Theorem 2 connects the new function to the classical rtaStep when
all jitters and ISR overheads vanish — the non-regression property
that anchors the Rust-side test no_isrs_matches_classical_rta.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request Apr 25, 2026
…I integration (#154)

Closes the v0.7.0 Track A milestone:

- COMPLIANCE.md "In progress / v0.7.0" expanded into a full narrative
  covering all four Track A commits (foundation #145, hierarchical RTA
  #147, Lean convergence #148, this close-out), the Track B variant-
  contract foundation (#144), v0.7.x infrastructure landings (#141-143,
  #151), and v0.8.0 planning anchors (Track D #149/#152, Track E
  #150/#153).

- Updated header date to 2026-04-25 and crate count from "16 crates,
  1200+ tests" to "17 crates, 1900+ tests" reflecting the test growth
  through Track A and the v0.7.x infrastructure additions.

- New CLI integration test crates/spar-cli/tests/track_a_close_out.rs
  exercises the full parse → instance → analyze pipeline on a model
  using the Spar_Timing::ISR_* property surface plus a sporadic handler
  thread. The unit + fixture tests in spar-analysis cover the algorithm
  at the analysis-crate level; this test guards the property surface
  flowing through the CLI binary end-to-end.

Out-of-scope items explicitly recorded: PIP/PCP blocking deferred to
v0.7.1, multi-processor ISR migration deferred, cache-aware
interference inflation deferred to v1.0+.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request Apr 26, 2026
Extends the v0.7.0 hierarchical IRQ-aware RTA with a configurable
blocking term B_i for tasks holding shared resources under PIP or
PCP. Reads AS5506 Thread_Properties::Locking_Protocol and a new
Spar_Timing::Critical_Section_Blocking time value.

Joseph-Pandya / Buttazzo: R_i(n+1) = C_i + J_i + B_i + Σ⌈...⌉·C_j + ISR.

Non-regression: models without Locking_Protocol produce byte-identical
output to main (verified by no_locking_matches_v070 test).

Closes the v0.7.1 follow-up explicitly carved out by #147 / #149.

New requirement: REQ-TIMING-PIP-001.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request Apr 26, 2026
Extends the v0.7.0 hierarchical IRQ-aware RTA with a configurable
blocking term B_i for tasks holding shared resources under PIP or
PCP. Reads AS5506 Thread_Properties::Locking_Protocol and a new
Spar_Timing::Critical_Section_Blocking time value.

Joseph-Pandya / Buttazzo: R_i(n+1) = C_i + J_i + B_i + Σ⌈...⌉·C_j + ISR.

Non-regression: models without Locking_Protocol produce byte-identical
output to main (verified by no_locking_matches_v070 test).

Closes the v0.7.1 follow-up explicitly carved out by #147 / #149.

New requirement: REQ-TIMING-PIP-001.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request Apr 26, 2026
Extends the v0.7.0 hierarchical IRQ-aware RTA with a configurable
blocking term B_i for tasks holding shared resources under PIP or
PCP. Reads AS5506 Thread_Properties::Locking_Protocol and a new
Spar_Timing::Critical_Section_Blocking time value.

Joseph-Pandya / Buttazzo: R_i(n+1) = C_i + J_i + B_i + Σ⌈...⌉·C_j + ISR.

Non-regression: models without Locking_Protocol produce byte-identical
output to main (verified by no_locking_matches_v070 test).

Closes the v0.7.1 follow-up explicitly carved out by #147 / #149.

New requirement: REQ-TIMING-PIP-001.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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