Do not attach today’s title, category or product facts to every historical event for the same URL. Preserve the version that was in effect under the verified publication record, then join by resource identity and time. A mutable current metadata table cannot reconstruct that history.
Time-based matching has a boundary: it identifies the publisher state supported by its interval evidence. It does not prove which bytes a reader received through every cache. Prefer an already-authorized observed version identifier when available, and keep uncertain exposure unknown rather than pretending a deployment timestamp proves every visit saw the new page.
Build Valid Intervals From Real Evidence
BigQuery’s time-series guide demonstrates turning timestamped state changes into temporal validity ranges and using those ranges in an AS OF join. The general idea is useful for content history: a version has a start boundary and remains valid until its supported end boundary.
Use actual production evidence, resource identity and a clearly defined clock. Planned release time, commit time and verified first-live time are not interchangeable. The release ledger supplies those distinctions and rollback history; this procedure consumes that history rather than replacing it.
Do not infer a version’s full live interval from one successful probe when delivery varied by host or edge. If the evidence supports only an expected configuration, name it that way. A gap in observed history should remain a gap, and a rollback should create another interval rather than erase the earlier version.
Work a Half-Open Interval Fixture
Use one fictional guide and one exact common clock measured in abstract minutes. These times and versions are teaching inputs, not historical StackM releases. The owner’s fixture policy treats an interval as inclusive at its start and exclusive at its end.
| Version | Start | End | Evidence state |
|---|---|---|---|
| V1 | 10 | 20 | Verified stable fixture state |
| V2 | 20 | 21 | Verified stable fixture state |
| V3 | 22 | Open-ended | Verified fixture state from 22 |
| Gap | 21 | 22 | No version assignment supported |
| Event time | Match | Reason |
|---|---|---|
| 9 | Unknown | Before known history |
| 10 | V1 | Inclusive start |
| 19 | V1 | Before end 20 |
| 20 | V2 | V1 end excluded; V2 start included |
| 21 | Unknown | Gap begins |
| 22 | V3 | V3 inclusive start |
| 23 | V3 | Within open-ended fixture range |
Five of seven events have a unique fixture assignment: two to V1, one to V2 and two to V3. Two remain unresolved. A current-only metadata join would label all seven V3, fabricating five assignments and erasing the two older versions.
The exact time 20 case is important. Making both ends inclusive would produce two matches at the cutover. Choosing an arbitrary first match would conceal the interval defect, not resolve it.
Execute the Boundary and Overlap Cases
This local Python checks the declared range convention. It has no analytics export, visitor data, database connection or deployment action. The code deliberately rejects overlapping intervals before assigning events.
versions = [('V1',10,20), ('V2',20,21), ('V3',22,None)]
def validate(intervals):
ordered = sorted(intervals, key=lambda r:r[1])
for name,start,end in ordered:
assert end is None or start < end
for left,right in zip(ordered,ordered[1:]):
assert left[2] is not None and left[2] <= right[1]
def assign(t, intervals):
validate(intervals)
hits = [name for name,start,end in intervals
if start <= t and (end is None or t < end)]
assert len(hits) <= 1
return hits[0] if hits else None
assert [assign(t,versions) for t in [9,10,19,20,21,22,23]] == [
None,'V1','V1','V2',None,'V3','V3']
try:
validate(versions + [('BAD',19,21)])
except AssertionError:
pass
else:
raise AssertionError('Overlapping version history must fail')The fixture contains one resource only. A production implementation validates intervals per immutable resource identity and namespace, not across the whole library. Two different guides can correctly have the same publication interval. The normalized times here are exact by assumption; real clock uncertainty needs separate handling.
Handle Timing and Delivery Uncertainty
If the event clock has material uncertainty near a cutover, do not choose the later version because the timestamp sorts that way. Compare the possible event-time interval with the version boundaries. An event that could fall on either side needs an unresolved assignment unless another permitted observation identifies its version.
Similarly, an edge serving stale V1 after the publisher’s V2 cutover defeats a simple time-only exposure claim. Keep the serving observation or existing version marker when available. If that evidence is absent, report expected publisher version rather than confirmed page exposure.
The restored-page measurement review describes another route to older content state: a page restored from browser history need not be a fresh fetch. A valid temporal lookup cannot override evidence that the browser retained a different revision.
Preserve the Original Event and the Mapping Version
Keep observed resource identity and event time unchanged in the controlled analysis. Store assigned version, mapping revision and evidence state as derived fields. If an interval correction arrives later, preserve the earlier issued assignment and explain the recalculation instead of rewriting the event as though it had always carried the new label.
Do not use an article’s cosmetic editorial display date as its valid-from time. The actual live interval controls this analysis. A source date from the authoring system may also precede production promotion and must remain distinct.
Use the measurement-gap framework for unresolved history. Dropping those events silently can make one version’s performance look better simply because its ambiguous exposures disappeared from the denominator.
Approve the Version-Level Interpretation
The final packet needs immutable resource identities, supported live intervals, clock basis, interval validation, join result counts, unknown coverage and mapping revision. A reviewer should reproduce all seven fixture outcomes and the deliberate overlap failure.
Then choose the outcome measure appropriate to the assigned population. Different version counts can reflect unequal exposure duration, audience mix or measurement coverage; the join does not create a randomized content test. The content-change test plan addresses that separate design question.
Approve when each claimed assignment has exactly one supported interval and its limits remain visible. The useful result is a defensible historical content view, with older facts and unknown exposures preserved, rather than a history rewritten through today’s metadata.
