Skip to content

feat(context): lock GitLab group + Bitbucket workspace (level 2) - #35

Merged
sandstream merged 2 commits into
mainfrom
feat/context-lock-gitlab-bitbucket
Jun 22, 2026
Merged

sandstream merged 2 commits into
mainfrom
feat/context-lock-gitlab-bitbucket

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Completes even git-host coverage: context-lock now verifies GitLab and Bitbucket too, not just GitHub.

What

  • ContextConfig gains [context.gitlab] (group, remote) and [context.bitbucket] (workspace, remote) — type + zod.
  • kit context check parses the live origin remote per host (parseGitlabRemote / parseBitbucketRemote, SSH + HTTPS, GitLab subgroups) and verifies it matches the declared values. A repo pushed to the wrong GitLab group / Bitbucket workspace is a mismatch, not a silent pass — the same cross-account guard GitHub already had.
  • suggestContextToml + hasLockableContext surface a detected GitLab/Bitbucket binding in the brownfield kit init offer.
  • Each is one (tool, field) row in FIELD_SPECS — the lock stays data-driven and the comparison stays pure/unit-tested ("only the exact declared pair passes").

Verify

npm run build && npm test → build clean, 1313 tests, 0 fail (+4: gitlab/bitbucket remote parsing + group/workspace lock ok/mismatch/unknown).

Now all three git hosts are even across kit: detection (analyze), kit health sensors (#34), and context-lock (this).

🤖 Generated with Claude Code

Extends the per-CLI context lock so a repo pushed to the wrong GitLab
group or Bitbucket workspace is a mismatch, not a silent pass. Adds
[context.gitlab] {group,remote} + [context.bitbucket] {workspace,remote}
to ContextConfig + zod, FIELD_SPECS rows, parseGitlabRemote /
parseBitbucketRemote (SSH+HTTPS, GitLab subgroups), gatherLive parses the
origin remote per host, and suggestContextToml/hasLockableContext surface
them in the brownfield init offer. Same data-driven (tool,field) model.
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit f2c9f49 into main Jun 22, 2026
14 checks passed
@sandstream
sandstream deleted the feat/context-lock-gitlab-bitbucket branch June 22, 2026 08:44
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