Skip to content

The run's bare names, and one clock behind them (#104) - #459

Merged
jeremymanning merged 1 commit into
mainfrom
fix/bare-runtime-names
Aug 3, 2026
Merged

The run's bare names, and one clock behind them (#104)#459
jeremymanning merged 1 commit into
mainfrom
fix/bare-runtime-names

Conversation

@jeremymanning

Copy link
Copy Markdown
Member

{{ pipeline_id }}, {{ execution_id }} and {{ timestamp }} are registered by the runtime and render correctly. All three were reported as undefined variables — the same false positive execution.timestamp had before #454 declared it, just without the prefix.

Declaring them turned up the interesting part

{{ timestamp }} and {{ execution.timestamp }} name one thing, and disagreed:

bare: 2026-08-03T08:07:56.022350
exec: 2026-08-03T12:07:56.022379+00:00

Four hours and 29 microseconds apart, in one run. TemplateManager._setup_base_context seeds timestamp from datetime.now() when the manager is constructed — neither the run's start nor the same value, and in local time without a zone while the run context is UTC.

#454 consolidated seven execution dicts and missed this one because it hides under a different name. runtime/execution_state.py had a third reading of its own. Both now take the run's answer:

bare: 2026-08-03T12:08:23.773336+00:00
exec: 2026-08-03T12:08:23.773336+00:00
AGREE

Not every bare name

current_timestamp and current_date appear in the catalogue about as often as the real ones and are populated by nothing. They stay refused, and a test says so — declaring three names must not wave through every bare name.

name validate run
pipeline_id ✅ (was rejected)
execution_id ✅ (was rejected)
timestamp ✅ (was rejected)
current_timestamp
current_date

Measured

before after
catalogue validating 48 / 117 50 / 117
blocking suite 725 passed 731 passed, 0 failed

Started this line of work at 9/117.

Mutations — three, all killed

mutation tests that failed
stop overriding the constructed timestamp the agreement test
data-flow validator forgets the bare names 3
declare names the runtime does not provide 4

One process note: git checkout <file> reverted uncommitted work mid-mutation-run, so the last "restored" check was against a broken tree. Caught it, restored, and re-ran both the focused suite and the full blocking suite from scratch rather than trusting the earlier numbers.

🤖 Generated with Claude Code

`{{ pipeline_id }}`, `{{ execution_id }}` and `{{ timestamp }}` are
registered by the runtime and render correctly. All three were reported as
undefined variables -- the same false positive `execution.timestamp` had
before #454 declared it, just without the prefix.

Declaring them turned up the interesting part. `{{ timestamp }}` and
`{{ execution.timestamp }}` name one thing and disagreed:

    bare: 2026-08-03T08:07:56.022350
    exec: 2026-08-03T12:07:56.022379+00:00

Four hours and 29 microseconds apart, in one run. `TemplateManager`
seeds a base context from `datetime.now()` when the *manager* is
constructed -- neither the run's start nor the same value, and in local time
without a zone while the run context is UTC. #454 consolidated the seven
`execution` dicts and missed this one, because it hides under a different
name.

The run now registers the bare alias from the same namespace, so both
spellings are the same instant. `runtime/execution_state.py` had a third
reading of its own; it takes the run's answer too.

`current_timestamp` and `current_date` appear in the catalogue about as often
as the real names and are populated by nothing. They stay refused, and a test
says so -- declaring three names must not wave through every bare name.

Measured: catalogue validating 48 -> 50 of 117; blocking suite 725 -> 731
passed, 0 failed.

Three mutations, all killed:
  - stop overriding the constructed timestamp -> the agreement test
  - data-flow validator forgets the names     -> 3 tests
  - declare names the runtime does not give   -> 4 tests

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jeremymanning
jeremymanning merged commit 8ad75c7 into main Aug 3, 2026
9 checks passed
@jeremymanning
jeremymanning deleted the fix/bare-runtime-names branch August 3, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant