3.8 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-repair-frontend-cache | Repair frontend dependency caching | in_progress | 2 |
|
plan.md |
|
|
|
Task 02: Repair frontend dependency caching
Summary
Resolve the pnpm store from the actual frontend container environment. Prove a compatible cache save and later restore without weakening dependency installation.
In scope
- Store discovery before the pinned cache action, with compatible versioned keys.
- Cold and unavailable cache behavior, plus exact lockfile enforcement.
- Curated save/restore and install timing evidence in this work order.
Out of scope
- E2E cache changes,
node_modulestransfer, toolchain upgrades, and runner activation.
Acceptance
- Cache restore and save use the path returned by pnpm under the installation environment.
- A cold cache installs successfully; a later compatible run reports a real restore without path warnings.
- Cache unavailability does not skip installation or hide installation errors.
Verification
Run commands from the repository root. Install workspace dependencies first in a fresh worktree.
python3 .github/scripts/frontend-tests-workflow-contract_test.py
python3 .github/scripts/lint-action-pinning_test.py
actionlint .github/workflows/frontend-tests.yml
git diff --check
For cache evidence, set CI_RUN_ID and CI_JOB_ID from an authorized run of the changed workflow.
Use these read-only commands for the cold and warm jobs:
: "${CI_RUN_ID:?Set a run ID}"
: "${CI_JOB_ID:?Set its frontend job ID}"
gh api "repos/kdlbs/kandev/actions/runs/$CI_RUN_ID/jobs?per_page=100"
gh api "repos/kdlbs/kandev/actions/jobs/$CI_JOB_ID/logs" > /tmp/kandev-ci-cache-job.log
rg 'Cache|cache|store|reused|downloaded|Path Validation' /tmp/kandev-ci-cache-job.log
Record a cache-service failure or controlled unavailable-cache check with a successful frozen installation. Do not weaken dependency failure handling to obtain that result.
Files likely touched
.github/workflows/frontend-tests.yml.github/scripts/frontend-tests-workflow-contract_test.py
Dependencies
Task 01.
Risks
Cache permissions and branch scope affect hits. Record runner identity, pnpm version, resolved path, key, and save/restore outcomes.
Parallelism
sequential
Inputs
- Requirements, acceptance IDs in frontmatter.
- System design, corresponding implementation boundary.
- Plan, baseline and companion-package status.
- Existing workflow contract tests under
.github/scripts/.
Results
Implemented 2026-09-12. The frontend container now resolves its pnpm store
with pnpm store path --silent before the cache action, records the pnpm
version, uses OS, architecture, version, and lockfile compatible keys, and
keeps pnpm install --frozen-lockfile after the best-effort cache step. The
same wiring is present in the frontend unit-test matrix jobs.
Local evidence:
cd apps && pnpm store path --silentreturned/root/.local/share/pnpm/store/v3.cd apps && pnpm --versionreturned9.15.9.python3 .github/scripts/frontend-tests-workflow-contract_test.pypassed (10 tests).python3 .github/scripts/lint-action-pinning_test.pypassed (9 tests).git diff --checkpassed.
Hosted cold-install, cache-save, and compatible cache-restore evidence remains open because the changed workflow was not dispatched or pushed in this task. The previous hosted baseline recorded a path-validation warning and no cache save; it is recorded in CI performance evidence.