Fix bild local rundep staleness (ava picks old agentd)

t-757·WorkTask·
·
·
Created2 weeks ago·Updated1 week ago·pipeline runs →

Description

Edit

Observed on /home/ben/omni/ava worktree after redeploying ava:

  • Omni/Ava/Core.hs declares -- : run Omni/Agentd.hs.
  • bild resolves local run deps in pipelineBuildOne (Omni/Bild.hs) by checking only whether _/nix/<dep> symlink exists.
  • If symlink exists, it reuses that store path without rebuilding or staleness check.

Evidence:

  • _/nix/Omni/Agentd.hs in ava worktree points to /nix/store/c8falmw...-agentd and has mtime Feb 5.
  • _/nix/Omni/Ava/Core.hs rebuilt Apr 6 and its wrapped binary embeds that stale path in PATH:

/nix/store/ikb1j...-ava/bin/ava contains /nix/store/c8falmw...-agentd/bin.

  • Live worktree has newer agentd symlink /nix/store/l9w31h8...-agentd.

Impact:

  • Ava runtime PATH can pin an older agentd binary even after redeploys.
  • Agent behavior may differ by worktree cache state.

Suggested fix:

  • In pipelineBuildOne, do not trust existing local rundep symlink as fresh.
  • Always run pipelineBuildOne for local run deps (nix will dedupe unchanged builds), or add a freshness check keyed by source hash/revision.

Timeline (7)

🔄[human]Open → InProgress2 weeks ago
💬[human]2 weeks ago

Implemented in Omni/Bild.hs: pipelineBuildOne no longer reuses an existing _/nix symlink for local :run deps; it now always analyzes/builds local rundeps, then resolves the symlink path. This prevents stale local symlinks from pinning old runtime binaries in wrapper PATH.

Verification:

  • typecheck.sh Omni/Bild.hs (pass)
  • bild Omni/Bild.hs (pass)
  • Reproduced regression path update:
  • before: _/nix/Omni/Agentd.hs -> /nix/store/c8f...-agentd (stale)
  • after bild Omni/Ava/Core.hs: _/nix/Omni/Agentd.hs -> /nix/store/l9w...-agentd
  • ava wrapper now embeds /nix/store/l9w...-agentd/bin

Evidence artifact: _/tmp/proof-t-757.md

🔄[human]InProgress → Review2 weeks ago
💬[human]1 week ago

Ava verified: implementation present in live tree (file/feature confirmed via inspection). Moving to Verified.

🔄[human]Review → Verified1 week ago