Defensive Publication: Fail-Closed Drift Gates and Red-Then-Green Gate Tests

This technical note records, for prior-art purposes, two mechanisms implemented and measured in FIBEMATE before this note existed. It does not claim to be the first disclosure of either idea, and it makes no security claim. (1) A fail-closed drift gate. Documents accumulate numbers: latency, coverage, test counts, byte sizes. Code and artefacts move; the prose does not. A gate that compares the two must decide not only whether values differ, but whether they are comparable at all. The disclosed decision table separates signal from verdict across six states: verified (bound, within tolerance), drift (bound, outside tolerance), ambiguous (candidate conflict or incomparable shape), unbound (no artefact can back the claim), ref-found and ref-missing (existence of a named artefact). Four rules keep the gate from manufacturing false reds and false greens. First, incomparable shapes are never drift: a ratio is not compared to a scalar, bytes are not compared to milliseconds, and a change of denominator (5/5 versus 36/36) is a change of test scope, not a numeric drift. Second, a magnitude guard rejects weak bindings: a time value bound to a unitless score, or a single-token artefact whose primary token does not match, is downgraded rather than failed. Third, a claim that cannot be bound is reported as unbound, never as verified; the gate can be configured to fail on it (--fail-on review) instead of treating missing evidence as agreement. Fourth, the policy is explicit and testable: drift fails only on drift, review also fails on ambiguous, unbound and missing references, and none is for audits, never for CI. Binding uses stable keys so that inserting a comment above a claim does not rename the claim and turn a typographic edit into a migration in the drift history. (2) Red-then-green tests for the gate itself.A gate is only as trustworthy as the test that watches it fail. The packaged demonstration runs the real engine twice against a temporary corpus. In the red phase the document claims p95=78.5ms while the artefact records 81.2: the claim is bound, marked drift, and the gate exits 1. In the green phase only the document changes, to 81.2: drift is 0 and the gate exits 0. The assertion covers both halves, because a green-only test passes both when the gate works and when the gate never fails at all. The packaged suite extends the same discipline to the surrounding states and includes controls that must not be labelled drift: a denominator change, a time value bound to a unitless score, a single-token artefact with a non-matching primary token, and a fail-on none run that must pass even while drift exists. Measured on the packaging machine: red run claims=2 drift=1 gate.failed=true exit=1; green run claims=2 drift=0 gate.failed=false exit=0; suite 96/96 passed. Scope. Code is quoted verbatim from the public tree at github.com/Lennonhaha/fibemate-tools/tree/a85a662fd584e74e6ac106e0798dcca52ed9ce30, path verifact/, Apache-2.0, zero runtime dependencies, Node 18 or newer. The deposit excludes the local cache, coverage output and packed tarballs; the SHA-256 list covers every included file. The two mechanisms are independent of the specific project: the decision table applies to any documentation-to-artefact check, and the red-then-green pattern applies to any gate that can be made to pass by never failing.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24692418
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Defensive Publication: Fail-Closed Drift Gates and Red-Then-Green Gate Tests

天赫 刘
Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
article

Defensive Publication: Fail-Closed Drift Gates and Red-Then-Green Gate Tests

天赫 刘
article en

Abstract

This technical note records, for prior-art purposes, two mechanisms implemented and measured in FIBEMATE before this note existed. It does not claim to be the first disclosure of either idea, and it makes no security claim. (1) A fail-closed drift gate. Documents accumulate numbers: latency, coverage, test counts, byte sizes. Code and artefacts move; the prose does not. A gate that compares the two must decide not only whether values differ, but whether they are comparable at all. The disclosed decision table separates signal from verdict across six states: verified (bound, within tolerance), drift (bound, outside tolerance), ambiguous (candidate conflict or incomparable shape), unbound (no artefact can back the claim), ref-found and ref-missing (existence of a named artefact). Four rules keep the gate from manufacturing false reds and false greens. First, incomparable shapes are never drift: a ratio is not compared to a scalar, bytes are not compared to milliseconds, and a change of denominator (5/5 versus 36/36) is a change of test scope, not a numeric drift. Second, a magnitude guard rejects weak bindings: a time value bound to a unitless score, or a single-token artefact whose primary token does not match, is downgraded rather than failed. Third, a claim that cannot be bound is reported as unbound, never as verified; the gate can be configured to fail on it (--fail-on review) instead of treating missing evidence as agreement. Fourth, the policy is explicit and testable: drift fails only on drift, review also fails on ambiguous, unbound and missing references, and none is for audits, never for CI. Binding uses stable keys so that inserting a comment above a claim does not rename the claim and turn a typographic edit into a migration in the drift history. (2) Red-then-green tests for the gate itself.A gate is only as trustworthy as the test that watches it fail. The packaged demonstration runs the real engine twice against a temporary corpus. In the red phase the document claims p95=78.5ms while the artefact records 81.2: the claim is bound, marked drift, and the gate exits 1. In the green phase only the document changes, to 81.2: drift is 0 and the gate exits 0. The assertion covers both halves, because a green-only test passes both when the gate works and when the gate never fails at all. The packaged suite extends the same discipline to the surrounding states and includes controls that must not be labelled drift: a denominator change, a time value bound to a unitless score, a single-token artefact with a non-matching primary token, and a fail-on none run that must pass even while drift exists. Measured on the packaging machine: red run claims=2 drift=1 gate.failed=true exit=1; green run claims=2 drift=0 gate.failed=false exit=0; suite 96/96 passed. Scope. Code is quoted verbatim from the public tree at github.com/Lennonhaha/fibemate-tools/tree/a85a662fd584e74e6ac106e0798dcca52ed9ce30, path verifact/, Apache-2.0, zero runtime dependencies, Node 18 or newer. The deposit excludes the local cache, coverage output and packed tarballs; the SHA-256 list covers every included file. The two mechanisms are independent of the specific project: the decision table applies to any documentation-to-artefact check, and the red-then-green pattern applies to any gate that can be made to pass by never failing.

Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon