Skip to content

Add CI actions, spec/docs, CLI features (scoped generation/verify, discover, explain), and tests#9

Merged
yzm1 merged 1 commit into
mainfrom
codex/consolidate-review-feedback-into-implementation-list
May 2, 2026
Merged

Add CI actions, spec/docs, CLI features (scoped generation/verify, discover, explain), and tests#9
yzm1 merged 1 commit into
mainfrom
codex/consolidate-review-feedback-into-implementation-list

Conversation

@yzm1
Copy link
Copy Markdown
Owner

@yzm1 yzm1 commented May 2, 2026

Motivation

  • Provide a zero-setup GitHub composite action for boundver verify and a tag-triggered PyPI publish workflow to simplify CI adoption and distribution.
  • Publish a spec-first contract (lockfile schema and hashing determinism) and update docs to reduce ambiguity and retire legacy guidance.
  • Improve CLI ergonomics for large repos by adding component-scoped generation/verification, discovery, and explainability helpers.
  • Increase robustness by adding merge-driver and portability shell helpers plus unit tests for new behaviors.

Description

  • Added a bundled composite GitHub Action at .github/actions/boundver/action.yml that sets up Python, installs the package, runs boundver verify and optionally prints a diff on failure.
  • Added a tag-triggered PyPI publish workflow at .github/workflows/publish.yml and updated README.md with release/CI guidance and new examples/usability notes.
  • Introduced spec artifacts under spec/ including boundary.lock.schema.json, HASHING.md, and spec.md, and added docs (docs/WHY_BOUNDVER.md, docs/LOCKFILE_MERGE.md, docs/IMPL_LIST.md, docs/IMPLEMENTATION_PLAN.md) and removed the stale boundary-lockfile.md.
  • Implemented new CLI and core behaviors in src/boundver/core.py: unified source-mode file enumeration, --components scoped generate and verify, generate_lockfile_for_components, deduplication of overlapping boundary paths, symlink hashing policy, discover and explain commands, changed_components_since_ref, and helper parsing utilities.
  • Added helper scripts scripts/boundver-merge-driver.sh and scripts/boundver-verify.sh for merge-driver regeneration and a portable shell verifier.
  • Added and extended unit tests in tests/test_boundary_lock.py covering deterministic generation, boundary deduplication, scoped generation/verify, discovery, explain output, symlink parity between head and working-tree, and other edge cases.

Testing

  • Ran the unit test suite with python -m pytest -q, which executed the updated tests/test_boundary_lock.py (new tests for explain, discover, scoped generate/verify, symlink handling, deduplication, and deterministic output) and passed.
  • Exercised the packaging/build smoke path used by CI by running the local build/install steps (python -m pip install --upgrade pip && pip install . and python -m build) to validate the GitHub Action commands, which completed successfully.
  • Verified deterministic lockfile generation behavior via the added --deterministic/idempotency tests in the unit suite, which succeeded.

Codex Task

@yzm1 yzm1 merged commit d429a1b into main May 2, 2026
1 check passed
@yzm1 yzm1 deleted the codex/consolidate-review-feedback-into-implementation-list branch May 2, 2026 20:17
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: a085ea7a4f

ℹ️ 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".

Comment thread src/boundver/core.py
Comment on lines +792 to +793
selected = set(components_filter or [])
use_filter = len(selected) > 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Respect empty changed-from filters during verify

When --changed-from resolves to no components, components_filter becomes an empty list but verify_lockfile treats that as “no filter” and verifies every component. This breaks the advertised scoped behavior (verify only changed components) and can fail CI on unrelated pre-existing lock drift even when no components changed since the base ref. Preserve the distinction between None (no filter) and an explicit empty selection ([]) so a no-change scope verifies nothing.

Useful? React with 👍 / 👎.

Comment thread src/boundver/core.py
Comment on lines +476 to +484
if out_path.exists():
merged = json.loads(out_path.read_text())
else:
merged = {
"schema": "boundary-lock/v1",
"project": config.get("project", "unknown"),
"components": {},
"slices": {},
}
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 Reject partial generate when baseline lockfile is missing

generate_lockfile_for_components initializes merged with empty components/slices when out_path does not exist, then recomputes affected slices against this incomplete map. For mixed slices, unselected components become None in component_digests, producing an incomplete lockfile instead of a valid full baseline. This is a data-integrity footgun for first-time or clean-environment runs of generate --components ...; the command should require an existing lockfile or fall back to full generation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant