Skip to content

chore: adopt bootstrap tooling mechanism#14

Merged
johnbenac merged 2 commits intomainfrom
chore/adopt-bootstrap-mechanism
Mar 27, 2026
Merged

chore: adopt bootstrap tooling mechanism#14
johnbenac merged 2 commits intomainfrom
chore/adopt-bootstrap-mechanism

Conversation

@johnbenac
Copy link
Copy Markdown
Contributor

Summary

  • Add bootstrap.sh to pull shared tooling scripts from the catalog-tooling OCI artifact at CI time
  • Remove all 7 checked-in scripts in scripts/ — now gitignored and populated by bootstrap
  • Remove dead Resolve platform contract digest step from publish workflow
  • Add scripts/ and .tooling/ to .gitignore
  • Update README to reflect bootstrap-based tooling model

Test plan

  • CI passes (bootstrap pulls tooling, canonical scripts validate catalog)
  • Publish workflow runs after merge and produces bundle
  • scripts/ directory does not appear in GitHub file tree after merge

Remove checked-in scripts and replace with bootstrap.sh that pulls shared
tooling from the catalog-tooling OCI artifact at CI time. Remove the dead
platform-contract digest resolution step from the publish workflow.

Scripts directory is now gitignored and populated automatically during CI.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4845661c14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

bootstrap.sh Outdated
mkdir -p "${TOOLING_DIR}"

RESOLVED_DIGEST="$(oras resolve "${TOOLING_REF}")"
PINNED_REF="${TOOLING_REF%%[:@]*}@${RESOLVED_DIGEST}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip tag/digest using the last separator

The pinned reference is derived with ${TOOLING_REF%%[:@]*}, which removes from the first : or @ onward, not the tag/digest separator. If OURBOX_CATALOG_TOOLING_REF points to a registry with an explicit port (for example registry.example.com:5000/org/tooling:stable), this produces registry.example.com@sha256:... and oras pull fails, breaking bootstrap in mirrored/private-registry setups. Parse using the last tag/digest delimiter (after the final slash) so refs with ports remain valid.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the commit just pushed. Changed %%[:@]* to %[:@]* (shortest match) so only the final :tag or @digest suffix is stripped. Registries with explicit ports (e.g. registry.example.com:5000/ns/repo:tag) are now handled correctly.

%[:@]*  strips only the final :tag or @digest suffix. The previous
%%[:@]* (longest match) would incorrectly strip from the first : or @,
breaking registries with explicit port numbers such as
registry.example.com:5000/ns/tooling:stable.
@johnbenac johnbenac merged commit 535b98a into main Mar 27, 2026
1 check passed
@johnbenac johnbenac deleted the chore/adopt-bootstrap-mechanism branch March 27, 2026 19:19
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