Skip to main content

Module integrate

Module integrate 

Source
Expand description

A lane’s serial integrator: every Built unit of its SDD that is ready, as one batch, in the lane’s own integration checkout. Fencing check first; then the write-set check (the branch changed only what the unit may write); a --no-ff merge per unit; the input check (the unit was built from the spec text mainline holds now); one run of the full integration gate over the merged tree; one integration commit carrying stamps, journal events, ledger, and a clean audit; CAS/push publish with lost-race redo; never leaves mainline failing. A red batch is integrated again one unit at a time, so one bad unit never holds back the others.

The gate: the SDD’s §5 Bootstrap and Build; the Verification tables of the units being integrated and of the SDD’s dirty Verified units — those a path they are checked against changed since their last recorded check, every dependent of the merged units among them — each distinct command once, run.gate_jobs at a time (rows::for_gate); the §5 Lint command; then the §5 Test command — the whole suite, which a merge must not turn from passing to failing — and audit checks 1–3. Rows of clean units are not run: their recorded checks hold. An SDD without a Test command has no backstop for what its declarations miss, so its gate runs every Verified unit’s rows. The integration commit records the re-checks the gate made (a verified event with actor recheck and a fresh stamp for each dirty unit whose rows passed) and suite: "pass" when the Test command passed, so a later run trusts them.

A lane that loses the publish race does not always gate again. The commits it lost to are replayed over when, beyond protocol state, they changed nothing its gate checked or read (Footprint): no file of a unit whose rows ran or of anything those units depend on, none of its SDD’s unmanaged files, no path outside every scope the SDD takes as input, and — when the gate ran the §5 Test command — nothing in its SDD’s scope at all. The merges are then replayed on the new head, the fencing, write-set and input checks made again there, and the result published without another gate.

No new failures: a failing row of a unit already Verified (and not in the batch) is run again on the base, in the lane’s own pristine base checkout (blame::judge). A row that passes there was broken by the batch, which is rejected. A row that fails there too was broken before the batch: its unit is rotten, the batch is judged on its other rows, and the rotten unit’s rows are left out of the lane’s later gates until the scheduler says otherwise (Integrator::forget_rotten). A failing row of the batch’s own units is always the batch’s.

Structs§

Footprint
What a gate checked or read, beyond protocol state: the units whose rows ran and everything they depend on, the SDD’s unmanaged files, the paths outside every scope it takes as input, and — when it ran the §5 Test command — the SDD’s whole scope. A test path (§6 tests:) counts only for a gate of its own SDD: a generated test when its owner is checked or the suite ran, a pre-existing test always; another SDD’s test paths are never read. A commit that changed nothing of it cannot change the gate’s verdict.
GateMemo
What a gate established, carried from one integration to the next so that nothing is run twice on the same tree.
HeadCheck
The state of the mainline head, for the termination report.
IntegrateRequest
Integrator
Rechecked
What a lane’s re-check batch found.
RottenRow
A Verification row that failed at a gate and on its base too: its unit is rotten.
SddCommands
The SDD §5 Commands block (### Commands in the core file). vitrify run preflight runs bootstrap, build and lint; the integration gate runs all four — test as a regression check (see Integrator).

Enums§

Outcome

Functions§

benign
Whether old..new moved nothing but protocol state — journals, ledgers, decision and change logs, the vitrify-managed fields of unit entries, in any SDD of the repository. Such commits — claims, renewals, releases, recorded questions — change nothing a build, a test or a lint reads, so what a gate established at old holds at new.
run_gate_command
Run one gate command via sh -c (the sanctioned shell use).
sdd_commands
spec_moved
Whether old..new changed the SDD’s own text — anything under its root beyond protocol state. Only then can a recorded trace have gone stale.