feat: project-tier toolchain (ocx.toml + ocx.lock)#67
Open
michael-herwig wants to merge 1 commit intomainfrom
Open
feat: project-tier toolchain (ocx.toml + ocx.lock)#67michael-herwig wants to merge 1 commit intomainfrom
michael-herwig wants to merge 1 commit intomainfrom
Conversation
Unit Test Results1 559 tests +198 1 559 ✅ +198 14s ⏱️ +2s Results for commit 817c4a3. ± Comparison against base commit 43d3f2d. This pull request removes 16 and adds 214 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Acceptance Test Results496 tests +80 483 ✅ +77 4m 16s ⏱️ + 2m 34s Results for commit 817c4a3. ± Comparison against base commit 43d3f2d. This pull request removes 61 and adds 141 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Introduce a project-tier toolchain layer. Drop an `ocx.toml` next to a project, declare tool versions, and `ocx pull` / `ocx add <tool>` / `ocx remove <tool>` / `ocx init` keep `ocx.lock` in sync with chosen tags resolved to digests. Shell integration (`ocx shell hook`, `ocx shell direnv`) activates and deactivates the locked toolchain when entering/leaving the project tree. Highlights: - `ocx.toml` schema with `[tools]` table; bare identifiers default to `:latest`. `ocx.lock` records resolved digest + manifest sources consumed by `ocx pull --project`. - New CLI verbs: `ocx init`, `ocx add`, `ocx remove`, `ocx update`, `ocx lock`. `ocx pull` learns `--project` and `--group` filters with symmetric progress reporting. - Shell activation stack — entering nested project trees layers the project toolchain on top of the parent's; leaving on exit reverts. - `ocx shell hook` / `ocx shell direnv` emit bash/zsh exports keyed on a fingerprint, reused across PROMPT_COMMAND / direnv invocations. - `--project` flag (and `OCX_PROJECT` env) forwarded through `OcxConfigView` so child ocx invocations inherit the parent's project selection. `OCX_NO_PROJECT` / `OCX_NO_CONFIG` env kill- switches for discovery. - Project registry retains `ocx.lock` backlinks; `ocx clean` walks reachability through registered project locks. - Atomic `ocx.lock` writes use a `.ocx-lock` sentinel; advisory `ocx.lock.lock` sidecar removed. - Index routing: explicit `IndexOperation` selection separates network-hitting lookups from pinned-id lookups that skip tag refresh. Dogfoods its own toolchain: cmake, shellcheck, shfmt pinned under `.ocx/index/ocx.sh/`; `ocx.toml` at repo root declares dev-tool versions used by `task verify`. BREAKING CHANGES: - `profile` library module and `ocx shell profile` CLI surface removed. Project toolchains supersede shell profiles. Migration: declare tools in `ocx.toml` and rely on `ocx shell hook` / `ocx shell direnv` for activation. - `ocx hook-env` removed. Use `ocx shell hook`. - `ocx exec --group` and the `[name=]identifier` positional alias removed. Exec pinned identifiers directly, or rely on shell-hook activation. - `ocx.lock` advisory locking now uses `.ocx-lock` sentinel file. External readers of the prior `ocx.lock.lock` sidecar must switch.
6f8f8ec to
817c4a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ocx.toml+ocx.lockwith sidecar exclusive lock for safe concurrent writesIndexOperation::{Query, Resolve}threaded throughIndexImpl; pinned-id pulls skip tag-pointer commit;--offline --remoteaccepted as pinned-only modeCommits
60c9c0ffeat(project)!: project-tier toolchain config (ocx.toml + ocx.lock)7f81111feat(project): add load_exclusive sidecar lock for ocx.lock writes06257c8feat(cli): project-toolchain commands and pull UX8a2acf2feat(cli): shell activation stack for project toolchain8b2b626fix(website): unbreak catalog generation in build pipeline6f8f8ecfix(oci): explicit IndexOperation routing + pinned-id tag-skipBreaking change: project-tier config (see
60c9c0f).Test plan
task verifygreen on CItest_project_config,test_project_pull,test_lock,test_shell_hook,test_shell_profile{,_generate},test_generate_direnv,test_pinned_offline,test_doc_project_toolchain,test_taplo_project_toolchain,test_exec_compose,test_index,test_update,test_schema_generationop_query_never_walks_source_in_any_modepassespinned_id_pull_skips_tag_pointer_commitpassestest_remote_index_list_does_not_write_local_tagspasses (filesystem byte-equality)test_pinned_id_exec_offline_succeedspasses (lock + pull + offline exec)ocx index list <pkg>@<digest>rejected with usage error--offline --remoteruns with info log, no registry contactunset OCX_INDEXworkaroundDocs
adr_index_routing_semantics.mdsubsystem-oci.md,subsystem-cli.md,subsystem-cli-commands.md,CLAUDE.mdcommand-line.md,environment.md,configuration.md,user-guide.md