Skip to main content

Module time

Module time 

Source
Expand description

The only sanctioned time value the render engine is allowed to use.

Per Resolved Decision #9 in agent-runtime-kit/docs/source/inventory-target-architecture.md, render output must be a pure function of the source-root contents. std::time::SystemTime::now() and chrono::Utc::now() are clippy-banned inside agent-runtime and nils-common. The single escape hatch is source_commit_timestamp, which returns the ISO-8601 commit timestamp of the source-root’s HEAD — a value that changes only when the source tree itself changes, so two cold processes rendering the same source produce identical output.

See crates/agent-runtime/docs/determinism.md for the full contract.

Functions§

source_commit_timestamp
Return the ISO-8601 commit timestamp of HEAD in the git repository at source_root. Equivalent to git -C <source_root> log -1 --format=%cI HEAD. The output is the only time-shaped value permitted to land in rendered output.