Skip to content

🐛 Fix(e2e): resolve the Daily checkout without the cwd and run the AIDP journey on the mock only - #4128

Merged
jeffwu-1999 merged 2 commits into
developfrom
cj/fix-daily-preflight-cwd
Oct 19, 2026
Merged

jeffwu-1999 merged 2 commits into
developfrom
cj/fix-daily-preflight-cwd

Conversation

@cj2026-bit

@cj2026-bit cj2026-bit commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The Ubuntu Daily run failed 36 seconds after the 2026-10-15 schedule. The launcher starts from the GitHub runner workspace (/home/jason/actions-runner/_work/...) while the checkout lives at /root/project/nexent; the external-knowledge preflight resolved the repository from the process working directory (repository_root()) and aborted the run with ValueError: Cannot locate repository root. The same change had also turned a per-case dependency into a batch gate: a missing machine-local profile config (config/aidp-journey.yaml) was reported as a doctor problem, and Daily refuses to start on any doctor problem — one optional case held the whole run hostage.

Fix

  • Explicit checkout for the preflight: static_config_problems(home, records, *, repo) receives the checkout as an explicit argument, doctor passes its already-resolved checkout through, and nothing in the preflight resolves a repository from the process working directory any more. The launcher itself already resolves the checkout from its own file location, so no other production change is needed; the profile-config gate is gone.
  • AIDP journey on the mock only: there is no real AIDP environment to smoke-test against (short and mid term), so the mock/real profile-selection mechanism is retired entirely. PW-KB-AIDP-01 declares its mock dependency directly (required_mock_services: [knowledge-provider]) like its sibling mock cases, the spec runs a single fixed seed oracle with no NEXENT_TEST_SELECTED_PROFILE / NEXENT_TEST_AIDP_REAL_* plumbing, ext_attach drops profile resolution and real_smoke export, the validator rejects profile_selection, and aidp-journey.example.yaml / schema are deleted. No machine needs a machine-local journey file at all.

Verification

Reproduced and verified end to end on a 1:1 WSL simulation of the Ubuntu Daily (launcher started from a runner-like working directory with the workflow's exact command, trimmed registry, the same machine-local build/deploy/preflight hooks):

  • Old revision (bb4cdad0c): Daily exits 2 in ~1s and records only "ValueError"; a diagnostic re-run from the runner-like cwd reproduces Cannot locate repository root from .../runner-work/_work/nexent/nexent with the stack at local_preflight.py repository_root().
  • Fixed revision (final HEAD of this branch): the Daily completes D0-D6 with the full related case set and --publish-latest green. Trimmed 4-case run PASSED 4/4 (warm 53s; cold 10m43s). Full related set (12 cases): 8 PASS (AGT-001/002, CTR-016/017/046/047, PERF-09, REL-02) — the four PW browser journeys fail inside the shared page-object locators (publish dialog and agent-editor buttons) that no longer match the current develop UI; those helpers are untouched by this PR and drive three cases it never modifies, so this is pre-existing suite/UI drift, not caused by this diff. PW-KB-AIDP-01's own mock chain — attach, real AIDP recall, oracle text and citation — passes preconditions 4/4 and steps 1-6, failing only at that shared publish-dialog drift.
  • Offline: tools tests 437 passed with exactly the pre-existing 17-failure set (one existing onboarding test call site adapted to the new explicit-repo signature; no new cases added), asset validator green, copyright headers in place.

Operational note: a machine that wants the mock-backed cases to run needs the ext-knowledge mock deployed with its identity recorded in the machine-local config/ext-knowledge.yaml (deployment owns the mock lifecycle); without it those cases are dependency-blocked individually with a concrete receipt instead of affecting the batch.

Problem: the Ubuntu Daily launcher runs from the GitHub runner workspace
while the checkout lives elsewhere; the external-knowledge preflight
resolved the repository from the process cwd (repository_root()) and
aborted the run with "Cannot locate repository root". A missing profile
selection config was also reported as a doctor problem, and Daily refuses
to start on any doctor problem.
Fix: static_config_problems(home, records, *, repo) receives the checkout
as an explicit argument and doctor passes its already-resolved checkout
through; nothing resolves a repository from the process working directory
any more, and the profile-config gate is gone. One existing onboarding
test call site is adapted to the new signature.
Verification: tools tests keep exactly the pre-existing 17-failure set
(437 passed, no new cases); the 1:1 Daily simulation reproduces the crash
on the old revision and runs the fixed revision green (D0-D6, 4/4 PASS).
@cj2026-bit
cj2026-bit force-pushed the cj/fix-daily-preflight-cwd branch 2 times, most recently from 3b1eded to 73c8e4d Compare October 17, 2026 04:13
…file selection

Problem: there is no real AIDP environment to smoke-test against, so the
machine-local config/aidp-journey.yaml selection and the mock/real_smoke
profile split were dead weight — one more manual machine-local file whose
absence previously gated runs.
Solution: PW-KB-AIDP-01 declares required_mock_services
[knowledge-provider] directly like its sibling mock cases; the spec runs
the fixed seed oracle with no profile env plumbing; ext_attach drops
profile resolution and real_smoke export; the validator rejects
profile_selection; the example and schema files are deleted; README, case
contract and change records updated.
Verification: tools tests 437 passed with exactly the pre-existing 17
failures (the profile-selection test class was removed with the
mechanism; no new cases added); the asset validator stays green.
@cj2026-bit
cj2026-bit force-pushed the cj/fix-daily-preflight-cwd branch from 73c8e4d to 9f57ed2 Compare October 19, 2026 02:07
@jeffwu-1999
jeffwu-1999 merged commit 848cf42 into develop Oct 19, 2026
5 checks passed
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.

2 participants