Skip to content

Prepare vector search automatically on Codespaces startup - #8

Merged
patty-chow merged 3 commits into
mainfrom
workshop/automatic-search-startup-20261018
Oct 19, 2026
Merged

patty-chow merged 3 commits into
mainfrom
workshop/automatic-search-startup-20261018

Conversation

@patty-chow

@patty-chow patty-chow commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Automatically prepare bundled vector search during both Codespaces profiles' startup, without automatically pulling Git changes or changing attendee exercises.

  • codespace:start first starts/seeds the core planner, then prepares both local sites for search. Core-ready and search-ready/unavailable messages are distinct.
  • Valid caches are verified by the actual model manifest's full SHA-256 and size plus ollama show; cached startup makes no host model-registry request and never starts the downloader.
  • Missing/mismatched cache uses the controlled download path with bounded signal-resistant downloader cleanup.
  • Shared checkout lock prevents concurrent automatic/manual preparation. Opt out with WORKSHOP_AUTO_SEARCH=0.
  • Optional search failures leave core work usable; cancellations and cleanup danger remain nonzero. Normal workspace:start remains the core-only fallback and does not pull Git or contact Azure.
  • Updated setup, presenter/local and acceptance documentation to distinguish automatic Codespaces startup from the manual fallback.

Evidence so far

  • Local tests: 181 passed, one existing Linux-only skip; 75 docs links checked.
  • Owned local empty-model-volume first startup: 55.72s including model download (Docker images were cached).
  • Cached local automatic start: 13.49s with host registry fetch forbidden; zero external fetches and downloader start/stop timestamps unchanged.
  • Actual search integration 1/1 and database integration 2/2 pass. Injected registry failure kept actual core health/state 200 with 216 sessions; opt-out/manual retry passed.
  • All owned local services stopped, volumes retained, unrelated services untouched.

Completed Codespaces and review gates

  • Fresh Attendee Codespace ran the actual postStart hook without manual commands: core HTTP200 at ~4m30, search ready at ~6m39 including first runtime/model downloads; both sites loaded 216 bundled vectors with zero document inference.
  • Actual stop/Shutdown/start: cached search phase 12.951s, total VM/core/search resume 83.792s. Downloader ID/timestamps unchanged; supplementary fetch-forbidden startup proved zero host registry fetch calls.
  • Browser untouched TODO1 plus search ready and real 0.747/0.724 results; real DB integration 2/2, search 1/1. Controlled registry-failure injection preserved core200; opt-out/recovery passed.
  • Review caught a retry-after-cleanup-failure gap; fixed at 92bc4a9 with pre-inference downloader inventory and a real-lock two-invocation regression. Reviewer approved the correction.
  • Targeted actual Codespace guard proof: live running downloader refused before startup/cache/fetch/index; other service states unchanged; scoped recovery then cached retry succeeded with zero fetches and unchanged downloader timestamps (10.03s search phase).
  • Final Codespace root tests: 195/195, docs75. Final documentation adds the measured evidence with exact revision scope; no additional runtime changes.
  • Environment/exercise-file hashes unchanged. Only the owned test Codespace was used and stopped; data retained. Organizer profile has config/test coverage but was not separately created.

No Azure resources, paid API keys, notebook deletion or automatic Git synchronization.

@patty-chow
patty-chow merged commit bedcfcd into main Oct 19, 2026
2 checks passed
@patty-chow
patty-chow deleted the workshop/automatic-search-startup-20261018 branch October 19, 2026 05:18
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