Skip to content

fix(troubleshoot): re-anchor prompt fault timing to the run so frozen fixtures stop drifting - #2427

Open
dmorosanu wants to merge 1 commit into
mainfrom
fix/troubleshoot-prompt-date-drift
Open

fix(troubleshoot): re-anchor prompt fault timing to the run so frozen fixtures stop drifting#2427
dmorosanu wants to merge 1 commit into
mainfrom
fix/troubleshoot-prompt-date-drift

Conversation

@dmorosanu

@dmorosanu dmorosanu commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Problem

Troubleshoot scenario fixtures are frozen snapshots with hardcoded absolute timestamps. Sixteen scenarios paired those fixtures with a prompt that anchors the fault to the calendar - "This started today", "faulted last night", "started failing this morning", "it worked yesterday". The fixture date never moves; the calendar does, so the gap widens every day. It is now 15 to 83 days.

The mock dispatcher's matcher ignores --created-after / --created-before, so an agent that correctly scopes its query to the window the user described still receives the out-of-window job. From the agent's side that looks like a correlation failure, and the right response is to refuse to attribute the fault to it.

That is what happened on rpa-serverless-robot-units. The agent queried with a today-window, got a job 15 days old, and stopped:

"the service returned an InvoiceParse fault timestamped 2026-07-19, not today, despite the requested 'today' window. I won't attribute today's incident to that older job."

It never reached or jobs get / or jobs logs, where the decisive "Your tenant's assigned Robot Units have been exceeded" message lives, and was then marked down for hedging - 0.850 against a 0.7 judge threshold. The behaviour was correct; the fixture was contradictory.

Fix

Re-anchor every fault-timing claim to the run or the schedule instead of the calendar:

Was Now
"faulted last night" "faulted on its most recent scheduled run"
"finished Successful last night" "finished Successful on its most recent run"
"started failing this morning" "started failing"
"This started today" "This started recently"
"it worked yesterday" "it worked on the previous run"

No fixture, manifest, criterion, judge prompt or RESOLUTION root cause changes. The diagnostic content of every prompt is preserved - prior-success contrasts, recurrence, and the "nothing changed on my side" framing all stay.

logon-failure-password-mismatch is the one nuanced case: its absolute date 2026-05-11 is evidence (AD PasswordLastSet vs the Orchestrator credential record), so the date stays and only the now-false "yesterday" / "this morning" framing is dropped - in the prompt, the simulator persona, the simulator constraint, and the matching aside in RESOLUTION.md.

Scope

16 scenarios, 17 files. A sweep of all 298 task YAMLs found 75 files containing a date word; 59 were left alone deliberately:

  • ~52 are the user describing their own access, not the fault's timing - "I'm not on the Robot host right now and have no shell access, only Orchestrator". Unrelated to fixture dates, and rewriting them would change each scenario's constraints.
  • excel-lookuprange-formula-cells - "Today's published price" is quoted error text and a workbook column semantic, not a timing claim.
  • uia-napplicationcard-view-generation, is-activities-prerelease-not-found - design-time scenarios with no dated fixtures at all, so there is nothing to contradict.

Validation

Agent arm matches the nightly: codex gpt-5.6-terra.

CI Run Coder Eval - 16/16 succeeded. 7 of the 16 carry skip: true and the workflow does not pass --include-skipped, so they were run from a throwaway ci/eval-pr2427 ref with the skip removed (ref deleted afterwards).

Scenario CI
rpa-serverless-robot-units 1.000
rpa-is-connection-not-authorized-cns 1.000
credential-store-unavailable 1.000
rpa-consecutive-system-exceptions 1.000
classic-click-noop-simulate 1.000
rpa-executor-service-disconnect 1.000
uia-click-noop-simulate-tech 1.000
classic-typeinto-field-not-cleared 1.000
uia-browser-communication-failed 0.925
excel-rr-sheet-case 1.000
excel-write-range-uninitialized-datatable 1.000
excel-delete-range-invalid-syntax 1.000
queue-items-failing-test 1.000
excel-write-range-formula-prefix 1.000
excel-scope-orphan-process-lock 0.962
logon-failure-password-mismatch 0.850

Local (all 16, --include-skipped) - 15/16. Nine at 1.000; six at 0.850 (all above the 0.7 judge threshold); one failure, rpa-consecutive-system-exceptions at 0.400.

That failure is pre-existing and unrelated to this change - a prompt-wording edit cannot affect folder-key selection, and the same commit scored 1.000 in CI. Re-run locally at n=3 it passed 3/3 (0.962 / 0.925 / 0.925). Cause: the folders-list fixture returns three folders, the mock ignores --output-filter, and the agent occasionally takes the first Key (the personal workspace) instead of OpsAutomation; or jobs list --folder-key <wrong> then matches no rule and unmocked_default: [] reads as "no faulted jobs". One replicate shows the agent self-correcting mid-run - first b2c8cb22…unmocked_default, then a5b5c6d7… → fixture. The 0.400 run is the case where it did not recover.

Note for reviewers

The starvation pattern behind that flake is the same one this PR fixes, seen from a different angle - and it is the third instance found:

  1. a process name used as a job key → no rule → []
  2. a correctly scoped --created-after window → out-of-window job (this PR)
  3. a correctly scoped --output-filter → unfiltered list → wrong key → []

In each case the mock ignores a filter flag and unmocked_default: [] with exit 0 is indistinguishable from a genuine empty result. Prompt wording only addresses case 2. The general fix - making unmocked_default return a non-zero exit so an unmatched or malformed query can never masquerade as "no results" - spans 244+ manifests and is deliberately out of scope here.

A durable alternative to this PR's approach would be shifting fixture timestamps relative to the run date at seal time, so "today" is always true and no prompt has to avoid the word. That is a shared-template change affecting every scenario and needs its own validation pass, so it is also not attempted here.

@dmorosanu
dmorosanu marked this pull request as ready for review August 3, 2026 11:19
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @dmorosanu's task in 3m 10s —— View job


Coder-eval task lint (advisory)

16 task YAMLs changed (all modifications, no new tasks); 0 Critical, 0 High, 0 Medium, 0 Low, 16 OK.

Rubric: .claude/commands/lint-task.md. This check is advisory and never blocks merge.

Evidence of passing run

✅ Author confirms passing run: "CI Run Coder Eval - 16/16 succeeded." and "Local (all 16, --include-skipped) - 15/16." — detailed per-scenario score table included in PR body.

Per-task lint

All 16 changed files modify only initial_prompt text (and in logon-failure-password-mismatch, the simulation persona/constraint fields and RESOLUTION.md). No success_criteria, sandbox, agent, or run_limits changes. Each task follows the troubleshoot suite's canonical two-criterion shape (skill_triggered + llm_judge against RESOLUTION.md), with run-limit fields correctly under run_limits: and no @uipath/cli in sandbox env_packages.

File Verdict
activity-packages/classic-click-noop-simulate/task.yaml OK
activity-packages/classic-typeinto-field-not-cleared/task.yaml OK
activity-packages/excel-delete-range-invalid-syntax/task.yaml OK
activity-packages/excel-rr-sheet-case/task.yaml OK
activity-packages/excel-scope-orphan-process-lock/task.yaml OK
activity-packages/excel-write-range-formula-prefix/task.yaml OK
activity-packages/excel-write-range-uninitialized-datatable/task.yaml OK
activity-packages/uia-browser-communication-failed/task.yaml OK
activity-packages/uia-click-noop-simulate-tech/task.yaml OK
products/integration-service/rpa-is-connection-not-authorized-cns/task.yaml OK
products/orchestrator/credential-store-unavailable/task.yaml OK
products/orchestrator/logon-failure-password-mismatch/task.yaml OK
products/orchestrator/queue-items-failing-test/task.yaml OK
products/orchestrator/rpa-consecutive-system-exceptions/task.yaml OK
products/orchestrator/rpa-executor-service-disconnect/task.yaml OK
products/orchestrator/rpa-serverless-robot-units/task.yaml OK

Within-PR duplicates

No duplicate clusters detected. (No new tasks added — all 16 are modifications to existing scenarios covering distinct failure classes.)

Conclusion

✅ All changed tasks pass the rubric. Evidence of passing run confirmed. The changes are a clean, mechanical re-anchoring of calendar-relative timing phrases to run-relative phrasing across all 16 prompts — no structural, criteria, or sandbox changes.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @dmorosanu's task in 2m 2s —— View job


PR Review: fix(troubleshoot): re-anchor prompt fault timing

  • Read review criteria and project conventions
  • Read full diff
  • Read existing PR conversation
  • Read each changed file in full for context
  • Check for cross-skill references, secrets, broken links
  • Post review findings

Summary

Re-anchors 16 troubleshoot scenario prompts from calendar-relative timing ("today", "yesterday", "last night", "this morning") to run-relative timing ("most recent run", "previous run", "recently") so frozen fixture timestamps no longer drift against the prompt's claim. Also updates the logon-failure-password-mismatch simulator persona, constraint, and RESOLUTION.md to drop the now-false "yesterday" framing while preserving the absolute date 2026-05-11 that serves as evidence.

Change-by-Change Review

1. Activity-package initial_prompt rewrites (9 files)

Severity: OK

classic-click-noop-simulate, classic-typeinto-field-not-cleared, uia-browser-communication-failed, uia-click-noop-simulate-tech — "finished Successful last night" / "faulted last night" → "on its most recent run" / "on its most recent scheduled run". All four preserve the diagnostic content (silent no-op, faulted step, prior-success contrast). Line wrapping adjusts cleanly.

excel-delete-range-invalid-syntax — "it worked yesterday…failed today" → "it worked on the previous run…then failed". Preserves the contrast ("had data" vs "freshly-recreated workbook").

excel-rr-sheet-case — "worked yesterday on my dev machine" → "worked on my dev machine". Drops the timing without changing the investigative signal (the sheet exists, the workflow previously succeeded). Clean.

excel-scope-orphan-process-lock — "opened fine yesterday" → "opened fine on the previous run". Preserves the "file isn't corrupt" context.

excel-write-range-formula-prefix — "Yesterday's run" → "The previous run". Clean.

excel-write-range-uninitialized-datatable — "since yesterday's" → "since the previous". Clean.

2. Product/orchestrator initial_prompt rewrites (6 files)

Severity: OK

rpa-is-connection-not-authorized-cns — "started failing this morning" → "started failing". Retains "It ran fine for weeks".

credential-store-unavailable — "started failing at launch this morning" → "started failing at launch". Retains the multi-bot-same-folder framing.

queue-items-failing-test — "4 failed items today" → "4 failed items". Clean.

rpa-consecutive-system-exceptions — "aborted this morning with" → "aborted with". Retains the error message verbatim.

rpa-executor-service-disconnect — "faulted on last night's" → "faulted on its most recent". Retains "The previous nights ran fine on the same machine" — this is a history description, not a calendar anchor, so correctly left in place.

rpa-serverless-robot-units — "This started today" → "This started recently". This is the scenario that motivated the PR (rpa-serverless-robot-units was the one that failed due to the 15-day drift).

3. logon-failure-password-mismatch/task.yaml (prompt + simulation)

Severity: OK

The most nuanced change. Four edits:

  • initial_prompt (L52-56): "since this morning" dropped; "yesterday (2026-05-11)" → "on 2026-05-11". The absolute date is evidence (AD PasswordLastSet), correctly preserved.
  • simulation.persona (L93): Same "yesterday (2026-05-11)" → "on 2026-05-11".
  • simulation.constraints[2] (L105): Same pattern in the AD-password-repeat constraint.

All three are consistent — the persona, the prompt, and the constraint now use the same wording. The date 2026-05-11 still gives the agent the signal it needs to compare against the Orchestrator credential's PasswordLastSet.

4. logon-failure-password-mismatch/RESOLUTION.md (L29)

Severity: OK

(yesterday, per the initial report…)(per the initial report…). Matches the prompt change — the parenthetical no longer claims "yesterday" since the prompt no longer says it.

What's Missing

Nothing identified. The PR description documents a thorough sweep of all 298 task YAMLs, explains which 59 remaining date-word occurrences were deliberately left alone, and the reasons are sound:

  • excel-lookuprange-formula-cells: "Today's published price" is error text / workbook semantics, not a timing claim
  • uia-napplicationcard-view-generation, is-activities-prerelease-not-found: design-time scenarios with no dated fixtures
  • ~52 references to user context ("I'm not on the Robot host right now") unrelated to fixture timing

I independently verified the remaining today/yesterday/this morning/last night hits in task.yaml files — all are correctly scoped to non-timing usage or non-fixture scenarios.

Area Ratings

Area Status Notes
Frontmatter OK No frontmatter changes — all edits are to initial_prompt, simulation, or RESOLUTION body
E2E Tests OK No new scenarios; existing scenarios' structure (tags, criteria, sandbox) unchanged
Skill Body N/A No skill source changes
References & Assets OK RESOLUTION.md edit is minimal and consistent with the prompt change
Repo Hygiene OK No secrets, no cross-skill refs, all changes scoped to tests/tasks/uipath-troubleshoot/

Issues for Manual Review

None found. The CI validation (16/16 pass) and the local n=3 rerun on the one flaky scenario (rpa-consecutive-system-exceptions — pre-existing mock starvation, unrelated to this change) are documented in the PR body.

Conclusion

Clean, well-scoped change. Every edit is a minimal prompt rewrite from calendar-relative to run-relative timing — no fixture, manifest, criterion, or judge prompt changes. The logon-failure-password-mismatch case correctly preserves the absolute date as evidence while dropping only the false relative framing. The PR body's analysis of the remaining date-word occurrences checks out. No issues found — approve.


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