RFC 9413 and protocol maintenance: retiring a temporary value alias
Explore the IAB's 2023 guidance on active protocol maintenance through a local Node.js experiment with one temporary alias in a work-order status field.
Archive retrospective · Topic year 2023
In this article
The interoperability problem in the 2023 RFC
RFC 9413 is an IAB document from 2023 about keeping independent implementations interoperable as specifications and deployment practices evolve. Its guidance concerns ongoing maintenance and the correction of divergence. Consider a print workshop with a planner that writes work orders and a dispatch board that decides when an order can leave the building. Both applications start out with the same two status values. One older adapter then writes a different word for a finished order. The dispatch board accepts that word to keep work moving. When the writer stays unfixed, the workaround becomes part of the behavior that future integrations observe. Another writer may copy it even though the written contract never changed. Maintaining the contract requires decisions about the reader, the writer, and the deployment evidence that connects them.
Two canonical values and one transitional alias
The local example uses open and done as canonical values. Uppercase spelling, added whitespace, and substitutions in another language fall outside the contract. Only the old value complete can take the compatibility path, when that path is enabled. Its resulting value is done. The normalized output stops downstream reports from carrying a deprecated spelling into another file format or dataset. The rule covers one known word. A new state demands a discussion about its effect on dispatch and the meaning clients will expose. A job awaiting a final inspection, for example, should never enter the shipping queue by accidental conversion to done. That operational effect is the reason to distinguish a deliberately verified alias from a mechanism that guesses the meaning of arbitrary unknown input.
Observe accepted aliases and invalid values
Every use of the compatibility path increments legacyAlias. Unexpected values and types increment unknownStatus, including a legacy spelling received while compatibility is disabled. Standard values do not affect either counter. Separate counters support different investigations. A remaining alias use may identify a writer that has yet to upgrade. An unknown value can indicate a contract disagreement that deserves a separate diagnosis. A bounded writer identity or release number, when available, can make this information easier to interpret. Keep the observation window long enough to represent the job cycle. A zero count during a period of light traffic offers weak evidence about an adapter that normally runs at month end. Check which regular producers actually reported activity before relying on silence for a removal decision.
Seven expectations in a local Node.js run
The experiment runs against memory on one machine. It checks the two canonical values, failure for the old spelling in strict mode, and normalization of that same spelling when the alias is enabled. It also checks failures for an unfamiliar string and for null with compatibility enabled. The final assertion checks the resulting counters. The intended result is one accepted alias and three rejected inputs. The recorded execution used Node.js 24.19.0 on Windows. The standards document dates to 2023 and the runtime is the one used for this reproduction. The snippet exercises a small application contract. A production adapter also needs tests for the surrounding message and the behavior of any store or downstream exporter that sees the canonical result. Producer and consumer fixtures can complement the results. A producer check catches an outgoing value outside the canonical vocabulary. A dispatch integration check confirms that an accepted, normalized result really reaches the correct queue.
import assert from 'node:assert/strict';
const status = {
open: 'open', done: 'done',
};
const aliases = new Map([['complete', 'done']]);
const counts = { legacyAlias: 0, unknownStatus: 0 };
function decode(value, compatibility = false) {
if (typeof value === 'string' && Object.hasOwn(status, value)) return status[value];
if (compatibility && aliases.has(value)) {
counts.legacyAlias++;
return aliases.get(value);
}
counts.unknownStatus++;
throw new Error('unknown_status');
}
assert.equal(decode('open'), 'open');
assert.equal(decode('done'), 'done');
assert.throws(() => decode('complete'), /unknown_status/);
assert.equal(decode('complete', true), 'done');
assert.throws(() => decode('finished', true), /unknown_status/);
assert.throws(() => decode(null, true), /unknown_status/);
assert.deepEqual(counts, {legacyAlias: 1, unknownStatus: 3});
console.log(JSON.stringify({node:process.version, checks:7, counts}));
Correct the writer and monitor the transition
Identify the writers and consumers first, and make the temporary rule traceable to an owner and a version. The release notes should record affected writers, the intended canonical value and the evidence that will support removal. Updated writers emit done only. Run reference fixtures from a representative operating cycle through each consumer. A once-a-month export deserves its own check even when the ordinary interactive writer produces clean traffic. After correcting the producer, disable the temporary path for a limited consumer group and inspect the error counts. If errors increase, trace them to the source release before broadening the change. A staged trial keeps the observations attributable and gives the service team a documented point at which to review the impact on dispatch.
Make retirement repeatable and testable
After removing the alias, preserve both successful canonical examples and the expected error for the retired value in regression fixtures. Record the relevant observations in the decision history so a future maintainer knows why the reader treats the old spelling as an error. An archive import may still need to decode an old format. A versioned conversion in that import keeps the historical data readable and limits the conversion to a specific source. Link operational measurements and the release decision so later teams can review what changed when a new integration arrives. This example applies the maintenance principle from RFC 9413 by bringing the reader, the written vocabulary, and the producer's observed behavior back into alignment.
Reader discussion
What would you change first for maintainability and testing in your own project?
No comments yet. Be the first to contribute.
Write a comment