Skip to content

Commit e142108

Browse files
committed
ci(book): add publishing and workflow files to path triggers
1 parent ee09683 commit e142108

16 files changed

Lines changed: 200 additions & 46 deletions

File tree

.github/workflows/book-build-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ permissions:
204204

205205
jobs:
206206
build:
207-
name: '${{ matrix.platform_emoji }} Build ${{ matrix.platform_name }} · Vol ${{ matrix.volume == ''vol1'' && ''I'' || ''II'' }} (${{ matrix.format_emoji }} ${{ matrix.format_name }})'
207+
name: '${{ matrix.platform_emoji }} Build ${{ matrix.platform_name }} · Vol ${{ matrix.volume == ''vol1'' && ''I'' || (matrix.volume == ''vol2'' && ''II'' || (matrix.volume == ''vol3'' && ''III'' || ''IV'')) }} (${{ matrix.format_emoji }} ${{ matrix.format_name }})'
208208
runs-on: ${{ matrix.runner }}
209209
timeout-minutes: 60
210210

.github/workflows/book-validate-dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,21 @@ on:
4444
paths:
4545
- 'book/**'
4646
- 'books/**'
47+
- 'publishing/**'
4748
- '.github/workflows/book-validate-dev.yml'
49+
- '.github/workflows/book-build-container.yml'
4850
- '.github/workflows/book-preview-dev.yml'
51+
- '.github/workflows/update-contributors.yml'
4952
push:
5053
branches: [dev] # Auto-trigger for dev branch
5154
paths:
5255
- 'book/**'
5356
- 'books/**'
57+
- 'publishing/**'
5458
- '.github/workflows/book-validate-dev.yml'
59+
- '.github/workflows/book-build-container.yml'
5560
- '.github/workflows/book-preview-dev.yml'
61+
- '.github/workflows/update-contributors.yml'
5662
workflow_dispatch: # Manual trigger for testing
5763
inputs:
5864
test_branch:

.github/workflows/contributors/auto_credit.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ def detect_projects(files: list[str]) -> list[str]:
4343
found: list[str] = []
4444
seen: set[str] = set()
4545
for f in files:
46-
top = f.split("/", 1)[0]
47-
key = dir_to_key.get(top)
48-
if key and key not in seen:
49-
found.append(key)
50-
seen.add(key)
46+
for p_dir, key in dir_to_key.items():
47+
if f == p_dir or f.startswith(f"{p_dir}/"):
48+
if key not in seen:
49+
found.append(key)
50+
seen.add(key)
51+
break
5152
return found
5253

5354

.github/workflows/contributors/projects.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"projects": [
44
{
55
"key": "book",
6-
"dir": "book",
6+
"dir": "publishing",
77
"section": {
88
"emoji": "📖",
99
"title": "Textbook Contributors",
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"key": "tinytorch",
15-
"dir": "tinytorch",
15+
"dir": "packages/tinytorch",
1616
"aliases": ["tito"],
1717
"section": {
1818
"emoji": "🔥",
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"key": "mlsysim",
25-
"dir": "mlsysim",
25+
"dir": "packages/mlsysim",
2626
"section": {
2727
"emoji": "🚀",
2828
"title": "MLSys·im Contributors",
@@ -59,7 +59,7 @@
5959
},
6060
{
6161
"key": "slides",
62-
"dir": "slides",
62+
"dir": "materials/slides",
6363
"aliases": ["slide"],
6464
"section": {
6565
"emoji": "🎞️",
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"key": "instructors",
72-
"dir": "instructors",
72+
"dir": "materials/instructors",
7373
"aliases": ["instructor"],
7474
"section": {
7575
"emoji": "🗺️",

.github/workflows/update-contributors.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ jobs:
120120
121121
- name: Commit Changes
122122
if: steps.update.outputs.changes_made == 'true'
123+
continue-on-error: true
123124
run: |
124125
BRANCH_NAME=${GITHUB_HEAD_REF:-$(git rev-parse --abbrev-ref HEAD)}
125126
@@ -144,9 +145,11 @@ jobs:
144145
145146
# Retry push with rebase up to 3 times to handle concurrent pushes
146147
MAX_RETRIES=3
148+
PUSH_SUCCESS=false
147149
for i in $(seq 1 $MAX_RETRIES); do
148150
if git push origin "$BRANCH_NAME" 2>/dev/null; then
149151
echo "✅ Push succeeded on attempt $i"
152+
PUSH_SUCCESS=true
150153
break
151154
fi
152155
echo "⚠️ Push failed (attempt $i/$MAX_RETRIES), rebasing..."
@@ -158,6 +161,11 @@ jobs:
158161
fi
159162
done
160163
164+
if [ "$PUSH_SUCCESS" = false ]; then
165+
echo "ℹ️ Could not push contributors update; will be retried on next scheduled run"
166+
exit 0
167+
fi
168+
161169
- name: Report Status
162170
run: |
163171
if [ "${{ steps.update.outputs.changes_made }}" = "true" ]; then

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
<b><a href="https://mlsysbook.ai">📘 Textbook Series</a></b> •
4343
<b><a href="https://mlsysbook.ai/vol1/">📗 Vol I</a></b> •
4444
<b><a href="https://mlsysbook.ai/vol2/">📘 Vol II (Preview)</a></b> •
45-
<b><a href="books/vol3/">🟣 Vol III (Notebook)</a></b> •
46-
<b><a href="books/vol4/">🌲 Vol IV (Notebook)</a></b>
45+
<b><a href="books/vol3/">🟣 Vol III (In Dev)</a></b> •
46+
<b><a href="books/vol4/">🌲 Vol IV (In Dev)</a></b>
4747
<br>
4848
<b><a href="https://mlsysbook.ai/tinytorch/">🔥 TinyTorch</a></b> •
4949
<b><a href="https://mlsysbook.ai/labs/">🔬 Labs</a></b> •

books/vol4/chapters/02-body/02-body.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ $$V_{\text{final}} = \sqrt{\frac{2(2.53\text{ J} + 28.7\text{ J})}{2.2 \times 10
433433
Average regenerative dump power: $\bar{P}_{\text{regen}} = 28.7\text{ J} / 0.120\text{ s} \approx 239.2\text{ W}$, which destroys power MOSFETs unless diverted into a brake chopper.
434434
:::
435435

436-
::: {#pri-power-bus-integrity .callout-principle title="Power Bus Integrity & Transient Decoupling"}
436+
::: {#pri-power-bus-integrity .callout-principle title="Power Bus Integrity and Transient Decoupling"}
437437
*Power rails are shared dynamical systems; simultaneous multi-axis torque steps will collapse bus voltage across source impedance ($R_{\text{bus}}$) and trip brownout resets unless clamped by coordinated current slew-rate limiters.*
438438
:::
439439

books/vol4/chapters/07-evaluation/07-evaluation.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ When reliability requirements scale to continuous-time physical systems governed
315315

316316
The **Butler & Finelli infeasibility bound** is the mathematical theorem establishing that certifying ultra-high cyber-physical reliability (e.g., catastrophic failure rates $\lambda \le 10^{-6}$ to $10^{-9}\text{ h}^{-1}$) through black-box operational exposure alone is physically impossible due to astronomical duration requirements ($T = -\ln(1-C)/\lambda$), mathematically necessitating deterministic runtime invariant enforcement and structured fault injection.[^fn-std-iso-asil]
317317

318-
::: {.callout-case-study title="Butler & Finelli Flight Control Software Reliability Infeasibility Study"}
318+
::: {.callout-case-study title="Butler and Finelli Flight Control Software Reliability Infeasibility Study"}
319319
*Study Overview:* In their landmark NASA Langley investigation, Ricky W. Butler and George B. Finelli proved mathematically that validating ultra-high reliability requirements for life-critical cyber-physical systems (such as commercial fly-by-wire flight control software requiring a catastrophic failure rate $\lambda \le 10^{-9}\text{ failures/hour}$) through empirical operational testing alone is physically impossible [@butler1993infeasibility].
320320

321321
*Mathematical Proof & Exposure Deficit:* Under a continuous-time Poisson failure process with failure rate $\lambda$, the probability of observing zero catastrophic failures over test duration $T$ is $P(0 \text{ failures in } T) = e^{-\lambda T}$. To certify that the true failure rate is at most $\lambda$ at confidence level $C = 1 - \alpha$, the required zero-failure physical exposure time is:

books/vol4/chapters/14-intervention/14-intervention.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ The damage from an uncoordinated handover extends beyond the physical interactio
362362

363363
An autopsy of physical handover collisions reveals the compound failure when these mechanisms align in a single event (@fig-14-ntsb-telemetry). In an analytical reconstruction of a high-speed mobile platform approaching an unmapped stationary barrier, the timeline decomposes into four distinct phases. In Phase 1, the learned vision policy fails to segment the barrier under low-contrast illumination, maintaining nominal speed while the safety margin shrinks. In Phase 2, the onboard monitoring loop detects kinematic divergence $1.8\text{ s}$ before projected impact and issues an acoustic takeover alert, but passive supervisory gaze decay delays operator perception by $1.2\text{ s}$. In Phase 3, with only $0.6\text{ s}$ remaining, the operator applies emergency manual steering torque, but the active low-level stability enforcer clamps the rate of change and applies counter-torque to prevent chassis slip. The resulting $6\text{ Hz}$ torque fighting locks the steering assembly, preventing lateral evasion.[^fn-inc-boeing-mcas] In Phase 4, the vehicle strikes the obstacle at $22\text{ m/s}$, shearing the front suspension and fracturing the steering gearbox drive pins. The failure occurred not because the operator was absent or because the safety enforcer was inactive, but because the architecture possessed no unified contract governing how authority transfers between them under deadlines.[^fn-inc-airbus-warsaw]
364364

365-
::: {.callout-case-study title="Boeing 737 MAX MCAS and Airbus A320 Warsaw Mode Confusion & Authority Contention"}
365+
::: {.callout-case-study title="Boeing 737 MAX MCAS and Airbus A320 Warsaw Mode Confusion and Authority Contention"}
366366
*Systems.*
367367

368368
1. Boeing 737 MAX 8 Flight Control Computer with Maneuvering Characteristics Augmentation System (MCAS) [@jatr2019boeing].

books/vol4/chapters/15-verification/15-verification.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Testing the heterogeneous Dual-Brain architecture—where an unprivileged Linux
303303

304304
Recording the resulting state trajectory, the detector identity, the exact refusal timestamp, and the time required to restore the bounded state requires instrumentation that is electrically and logically independent of the machine under test. If the test engineer relies on the onboard logging daemon to measure reaction times, the measurement is corrupted by the very failure it attempts to capture, because a faulted CPU or a saturated bus delays log serialization.[^fn-hw-seu-bitflip] Furthermore, independent measurement prevents the acceptance of false passes where the machine survived for reasons absent from the safety claim. A documented example occurred during ground qualification testing of the Apollo guidance computer, where simulated testing failed to uncover an asynchronous memory-bus stealing flaw caused by the rendezvous radar interface; in flight, the hardware stole $15\%$ of all memory cycles, triggering the famous 1202 and 1201 alarm conditions.[^fn-inc-apollo-1202] An even simpler failure mode on modern test benches occurs when an injected overpressure fault triggers an unmonitored thermal breaker or an auxiliary ground loop that drops power to the valve drive coil. The valve springs shut mechanically, keeping pressure inside the containment bound, while the software enforcer has actually deadlocked in a priority inversion.[^fn-inc-toyota-ua] An automated oracle that only inspects downstream pressure registers a pass, manufacturing false confidence from an unverified hardware artifact. The test framework must verify that the specific enforcer path described in the safety claim executed the corrective action.
305305

306-
::: {.callout-case-study title="Toyota Unintended Acceleration Bit-Flip & Watchdog Death"}
306+
::: {.callout-case-study title="Toyota Unintended Acceleration Bit-Flip and Watchdog Death"}
307307
*System:* Toyota Electronic Throttle Control System (ETCS-i) operating on an integrated Denso/Hitachi 32-bit microcontroller without a hardware Memory Protection Unit (MPU) or task-isolated memory spaces [@barr2013toyota; @nasa2011toyota].
308308

309309
*Incident:* Widespread unintended acceleration events (notably *Bookout v. Toyota*, 2007 Camry) resulting in catastrophic high-speed collisions. Vehicles accelerated to wide-open throttle (WOT) uncommanded; pumping or standing on the mechanical brake pedal was insufficient to overcome full engine torque, and the throttle actuator refused to close.

0 commit comments

Comments
 (0)