Repository navigation
feat: bootstrap smoke-test repo with bare-runner CI - #210
Conversation
…-commit hook This change modifies the pre-commit configuration to remove the 'check-skill-names' hook in addition to 'generate-docs'. 'check-skill-names' only makes sense in this project and should not be shipped downstream. Refs: #170
This update introduces a new pre-commit hook, 'sync-manifest', which synchronizes the workspace template with the manifest. The hook executes a script to ensure that the assets/workspace directory is kept in sync with the manifest. Existing files are synchronized here too. Refs: #170
Updated the pre-commit configuration to streamline the entry commands for the 'generate-docs' and 'sync-manifest' hooks by calling the script directly. Refs: #170
Remove "hadolint-docker", "pip-licenses", "check-action-pins", "bandit", and "validate-commit-msg" They are not available in downstream projects yet. Refs: #170
- Move PRE_COMMIT_HOME, UV_PROJECT_ENVIRONMENT, VIRTUAL_ENV from docker-compose.yml to Containerfile image ENV - Remove --no-install-project from sync recipe so project is installed - Add just sync step to init-workspace.sh after placeholder replacement Refs: #170
…initialization Refs: #170
Signed-off-by: Carlos Vigo <[email protected]>
There was a problem hiding this comment.
Pull request overview
Bootstraps smoke-test infrastructure for issue #170 by hardening the devcontainer image and workspace template so the shipped workspace CI (assets/workspace/.github/workflows/ci.yml) can run successfully on a bare GitHub-hosted runner (no devcontainer).
Changes:
- Bake runtime env vars into the image, add
bandit[toml]to the image toolchain, and update dependency sync behavior to install the project package during workspace initialization. - Extend workspace bootstrap automation (
setup-gh-repo.sh) to detach org-level default code security configuration and update template/manifest transforms accordingly. - Add/adjust integration + image tests (including new BATS coverage) to validate bootstrap + tooling behavior.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Containerfile |
Installs bandit[toml] and bakes PRE_COMMIT_HOME, UV_PROJECT_ENVIRONMENT, VIRTUAL_ENV into the image. |
assets/init-workspace.sh |
Preserves README.md/CHANGELOG.md on upgrades and runs just sync during init. |
justfile.base |
Makes sync install the project; update delegates to sync. |
assets/workspace/.devcontainer/justfile.base |
Mirrors sync/update behavior in the workspace template. |
assets/workspace/.devcontainer/docker-compose.yml |
Removes env vars now baked into the image; keeps runtime socket env vars. |
assets/workspace/.github/actions/setup-env/action.yml |
Adds a pre-commit install step for bare-runner CI setup. |
assets/workspace/.devcontainer/scripts/setup-gh-repo.sh |
Adds org default code security configuration detachment logic. |
tests/bats/setup-gh-repo.bats |
Adds BATS assertions covering setup-gh-repo.sh behavior/structure. |
tests/conftest.py |
Updates init-workspace stage tracking for the new “Syncing dependencies” step. |
tests/test_integration.py |
Updates docker-compose env expectations and adds regression for uv.lock after init. |
tests/test_image.py |
Adds bandit version expectation and adjusts uv venv workflow test env handling. |
scripts/transforms.py |
Expands empty pre-commit repo block cleanup to apply to any repo: block. |
scripts/manifest.toml |
Updates workspace-sync entries/transforms (including more hook removals + trailing blank line stripping). |
assets/workspace/.pre-commit-config.yaml |
Removes hooks not intended for downstream template usage. |
assets/workspace/.devcontainer/scripts/gh_issues.py |
Enhances issue/PR listing with GitHub hyperlinks and CI status rollup display. |
assets/workspace/.cursor/skills/worktree_verify/SKILL.md |
Adds delegation guidance content. |
assets/workspace/.cursor/skills/worktree_ci-fix/SKILL.md |
Adds delegation guidance content. |
assets/workspace/.cursor/skills/ci_check/SKILL.md |
Adds delegation guidance content. |
assets/workspace/.cursor/skills/worktree_plan/SKILL.md |
Removes delegation section content. |
assets/workspace/.cursor/skills/worktree_execute/SKILL.md |
Removes delegation section content. |
assets/workspace/.cursor/skills/worktree_brainstorm/SKILL.md |
Removes delegation section content. |
assets/workspace/.cursor/skills/code_review/SKILL.md |
Removes delegation section content. |
README.md |
Updates recipe listings/descriptions to match current Justfile grouping. |
CONTRIBUTE.md |
Updates recipe listings/descriptions to match current Justfile grouping. |
CHANGELOG.md |
Adds Unreleased entries describing smoke-test bootstrap work + related fixes. |
.pre-commit-config.yaml |
Makes docs generation hook non-swallowing; adds a sync-manifest hook. |
.github/pr-draft-128-into-dev.md |
Removes an obsolete PR draft file. |
Comments suppressed due to low confidence (1)
assets/workspace/.github/actions/setup-env/action.yml:108
- The action installs
pre-commitvia systempip, but the workspace CI workflow runsuv run pre-commit .... Sincepre-commitis not a project dependency inassets/workspace/pyproject.toml,uv runwon't be able to find it. Consider installing it into the uv environment (e.g., viauv pip install pre-commitafteruv sync) or changing the workflow to callpre-commitdirectly if you intend a global install. Related: the workspace CI also runsuv run bandit ..., butbanditisn't installed here either, so bare-runner CI will still fail unless it’s installed into the same environment.
# ── pre-commit ───────────────────────────────────────────────────────────
- name: Install pre-commit
shell: bash
run: python -m pip install --upgrade pre-commit
# ── Python dependencies ───────────────────────────────────────────────
- name: Sync Python dependencies
if: inputs.sync-dependencies == 'true'
shell: bash
run: uv sync --frozen --all-extras
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@gerchowl this PR temporarily disables all local pre-commit hooks in the shipped container with [[entries]]
src = ".pre-commit-config.yaml"
transforms = [
{ type = "RemovePrecommitHooks", hook_ids = [
"hadolint-docker",
"generate-docs",
"sync-manifest",
"pip-licenses",
"check-action-pins",
"bandit",
"check-skill-names",
"prepare-commit-msg-strip-trailers",
"check-agent-identity",
"validate-commit-msg",
] },
...
]This is necessary to run CI in the smoke-test repo, will be fixed with #171. If that's fine, approve & merge. |
|
@gerchowl reminder |
Description
Bootstraps the smoke-test infrastructure for issue #170. This PR delivers the devcontainer-side changes required to allow a downstream workspace (bootstrapped from the template) to run
ci.ymlsuccessfully on a bare GitHub-hosted runner — without a devcontainer being present.The changes harden the image and workspace template so that tools like
pre-commitandbanditare available in both devcontainer and bare-runner contexts, move runtime environment variables into the image, and wirejust syncinto the workspace bootstrap so the project package is installed from the start.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
Containerfile— addbandit[toml]to system Python install; bakePRE_COMMIT_HOME,UV_PROJECT_ENVIRONMENT, andVIRTUAL_ENVasENVso they are available outside the devcontainer contextassets/workspace/.github/actions/setup-env/action.yml— add mandatorypre-commit installstepassets/workspace/.devcontainer/scripts/setup-gh-repo.sh— detach org default code security configuration on post-createassets/workspace/.devcontainer/justfile.base/justfile.base—syncrecipe no longer passes--no-install-project;updatetarget callssyncassets/init-workspace.sh— runjust syncafter placeholder replacement so the project package is installed during bootstrapassets/workspace/.devcontainer/docker-compose.yml— remove env vars now baked into imagetests/test_integration.py— new/updated integration tests covering all of the abovetests/bats/setup-gh-repo.bats— BATS tests for security-config detachCHANGELOG.md— Unreleased entries addedChangelog Entry
Added
ci.ymlpasses on a real GitHub-hosted runnerbanditpre-installed in devcontainer image (#170)bandit[toml]added to the system Python install in the Containerfilepre-commitpre-installed in CIsetup-envaction (#170)setup-envcomposite action now installspre-commitas a mandatory step so hooks are available in bare-runner CI without a devcontainersetup-gh-repo.shdetaches org default code security configuration (#170)init-workspace.shrunsjust syncafter placeholder replacement (#170)uv.lockfor the new project name and installs the project package into the venv during workspace bootstrapChanged
docker-compose.ymlinto ContainerfileENV(#170)PRE_COMMIT_HOME,UV_PROJECT_ENVIRONMENT, andVIRTUAL_ENVare now baked into the image so they are available outside of the devcontainer context (e.g. bare-runner CI)just syncinstalls the project package (#170)--no-install-projectfrom thesyncrecipe so the workspace project is always installed into the venvTesting
just test)Manual Testing Details
N/A
Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
N/A
Refs: #161, #170, #186