chore: log orgId, pod, and UTC timestamp on NUT failures - #475
Merged
Conversation
Emit a structured [NUT-CONTEXT] line at shared scratch-org setup and a [NUT-FAILURE] line on any failing z-series test, carrying orgId, instance/pod, a UTC timestamp (MM/DD/YYYY:HH:mm:ss), and the error, so CI failures can be correlated in Splunk. Only non-sensitive identifiers are logged; no auth tokens or devhub.
setu4993
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds structured, CI-log-friendly context to the shared z-series NUT setup (
test/nuts/shared-setup.ts) so failures can be correlated in Splunk:[NUT-CONTEXT]— emitted once when the shared scratch org is created, withorgId,pod(instance name), and a UTC timestamp. Always present in every run.[NUT-FAILURE]— rootafterEachthat, on any failing z-series test, logsorgId,pod, UTC timestamp, test name, and the error.Timestamp format is
MM/DD/YYYY:HH:mm:ss(UTC).Example lines:
Why
The z-series NUTs (run from
@salesforce/agents'xNuts-plugin-agentjob and here) have been failing in ways that are hard to triage from CI logs because the org and instance aren't recorded. These lines make orgId + pod + time-of-failure greppable.Note on hook failures
A failing
before allhook (e.g. the z4AiTestingDefinitiondeploy) is not caught byafterEach, but the[NUT-CONTEXT]line logged at setup still records that run's orgId + pod + time for correlation, and mocha prints the hook error itself.Safety (public repo)
Only non-sensitive identifiers are logged — orgId and pod of an ephemeral, per-run scratch org, plus a platform error string. No auth tokens, no session URL, and no devhub are logged (called out in code comments so it isn't widened later).
Companion
Sister PR forcedotcom/agents#342 adds the equivalent logging to the agents repo's own NUTs (the
nutsCI job).