What must memory retain?
Two records can agree today and give different answers after the same next step. Which differences must a record keep so you can still give the right answer tomorrow?
Can this particular record cross a revision?
A library used to promise telescope pickup to anyone with a reservation. The revised promise also requires an evening desk. A family returns with its old reservation. Phaseline checks the original record, the librarian’s approved mapping between editions and the scheduler’s evidence for this family. Closing the desk changes what the family can do next.
This runs locally on synthetic records. One read costs one unit at reservation and the evening check costs two. Both draw on the original three-unit allowance. The supplied example key represents a trusted library authority. An actual library would obtain that key and the current grant from its own records.
When the signer leaves out a possibility. In a separate control the signer lists only the open desk as a possible successor of this reservation. With the desk record missing, the checker concludes pickup is available in that model. The independently supplied closed-desk case gives the opposite answer. Checking a signature establishes who approved the map. Checking the map against the operating library takes separate evidence.
Run the same handoff in your terminal · Inspect the regression
Same for which purpose?
Write the questions you need to answer. List the operations your system permits. Two histories may share a code exactly when their answers agree now and after every finite sequence of those operations. A state with a different name can be safe to merge. Two states with identical answers today can still need different codes.
The model author supplies the possible histories. The observer gets only the fields it is allowed to read. Keeping those roles separate is what lets the checker say both “two bits suffice in this model” and “you cannot produce those bits from this record.”
Change the question the archive must answer
An archive kept one bit per item recording whether it had been published. Its new rule says people may rely on a published item only if a review was signed. Compare two drafts before either is published. Today both say no. What will the old record tell you after publication?
Edit the rules and transition table
Inspect the codes, transitions and recovery decisions
Where the bit count comes from
Group histories by their answers. Split a group whenever the same action would lead two members to different groups. Repeat until each group has one answer vector and one destination group per action. Starting in the right group, this table reproduces the answers after one step, then two, then any finite number of steps. Conversely, every split gives an experiment that distinguishes its members. Any exact deterministic record must keep them apart.
If there are k final groups, the smallest fixed-width code occupies ceil(log₂ k) bits per item. One group needs zero bits. This is classical finite-state minimization. The decoder and transition table are shared. Their storage, construction, checking and execution cost are additional. A CPU instruction or a different binary layout can change those costs. It cannot restore a distinction already erased from its input. Hopcroft’s report on finite-automaton minimization.
Can the old bits answer a new question?
For each old code, count how many revised codes are possible. If every count is one, a translation table suffices. If the largest count is m, an extra ceil(log₂ m) fixed-width bits per item suffice alongside the old code: number the revised alternatives separately inside each old group. Fewer bits force a collision in the largest group. Those bits had to be recorded while the difference was accessible, or recovered from a source that still holds it.
The checker separately calculates the minimum worst-case observation cost of recovering the revised code from the old one, current observations and the exact repeatable measurements on offer. Costs are additive units specified by the model author, such as one unit per instrument read. The output includes a decision tree for each case within budget. If even all the offers leave a disagreement, it gives two histories and a shortest future sequence that exposes the loss.
Two bits before, two bits after. What was lost?
A stage manager records whether a stream is in draft, rehearsal or live. Three distinguishable stages need two bits. A revised rule also requires signed captions. Under that rule the six listed histories form four groups, which still fit in two bits. Yet the old record discarded the signature. Two drafts with identical old bits advance through rehearsal into broadcast. One may stream and the other must wait.
The storage bill is identical. The meaning of the bits changed. Phaseline finds that keeping the old code requires one additional bit to distinguish the revised cases. In this run the observer has no other source for the signature, so it cannot migrate every old record. Inspect the codes and the two-step witness.
Download the two editions, regime and expected result. Extract them in your project and run the same check.
npx --no-install phaseline retain issued.phase regime.json proposed.phase
Where completeness can fail
Remove the unchecked items in the example. The analyzer can now translate the old code perfectly on every supplied case. The lesson keeps a separate trace of a draft being published and still denied reliance. It fits the full model. Once the unchecked items are removed, no listed history explains the trace. This is a simulated observation you can inspect and replace with a recording of your own. An inconsistent trace calls the model, the observation or their interpretation into question. A consistent trace establishes compatibility on that run. This is why agreement at delivery alone cannot justify every upstream assumption. To recover a particular upstream fact from a downstream record, that fact must agree across every history consistent with the record. If arbitrary new questions are allowed, any two different histories can be separated by a question about their difference.
The broader research asks how an observer discovers missing possibilities, obtains evidence, constructs and pays for its model, validates its checker through revision and carries an authorized decision into the world. Here, possible states, rules, action meanings, observations and prices are supplied. The command establishes an exact storage bound within that contract. Evidence that the contract covers a real system, authority to act and confirmation of delivery come from outside this calculation. From evidence to a licensed effect.
Use your own regime
Run phaseline init records retention. In regime.json, questions names Boolean guarantees in both editions. actions names the common operations. Each entry in states has a unique ID, typed facts and one next destination for each action. Every listed state is an admissible starting point. IDs are labels for inspection. observe declares the fields readable at encoding time, offers prices additional observations, and budget funds recovery. The old code is assumed authentic when testing migration.
Both editions use the same underlying transition model and evidence meanings. Bounds are 128 states, 16 questions, 16 actions, 12 offered fields and 10,000 acquisition-planning subsets. Exceeding an implementation limit returns an error. The command makes no claim about nondeterministic or omitted transitions, translating a changed sensor, unbounded systems or total lifecycle cost.
npx --no-install phaseline retain records/issued.phase records/regime.json records/proposed.phase
npx --no-install phaseline challenge records/proposed.phase records/regime.json records/trace.json
Install the CLI · Read the implementation · Inspect the independent checks