Skip to content

Pre-push hook claims CI enforces on push; CI has no push trigger #236

Closed

Description

@abogartz

Finding

.githooks/pre-push:7 prints "merge-gate: SKIPPED via SKIP_GATE=1 - CI will still enforce everything", and the comment at lines 2-4 repeats the promise. But ci.yml triggers on pull_request and workflow_dispatch only: a commit pushed with the gate skipped can reach main, and release.yml publishes on push to main without re-running tests (its own comment at lines 19-21 says so and accepts it).

Fix direction

At minimum, correct the hook text so it no longer promises enforcement that does not exist. Separately, record an explicit accept-or-accept decision on a main-branch safety net (nightly job, or a gate step inside release.yml before publish). The workflow design itself is documented and coherent; the false hook message is the defect.

Source

Architecture review 2026-10-31, finding C1; the 2026-11-01 review examined the same workflows and cleared the design, so only the hook text is mandatory here.


Acceptance criteria (maintainer, 2026-11-02)

Scope is the hook text only. The workflow-design question raised below — a nightly job or a gate step inside release.yml — is a maintainer decision and is out of scope here. Do not open, edit or propose a change to anything under .github/workflows/; that is forbidden to this agent and a PR that touches it will be closed.

Facts, re-verified against origin/main on 2026-11-02, so the line numbers below are current:

  • .githooks/pre-push:7 prints merge-gate: SKIPPED via SKIP_GATE=1 — CI will still enforce everything.
  • .githooks/pre-push lines 2-4 repeat the promise: CI enforces the same checks; this one just fails faster.
  • .github/workflows/ci.yml triggers on pull_request and workflow_dispatch only. There is no push trigger, so a commit pushed directly to main runs no CI at all.
  1. .githooks/pre-push no longer states or implies that CI will enforce the gate on a push. Both the echo on line 7 and the comment block on lines 2-4 must be corrected.
  2. The corrected text states what is actually true: skipping the gate means no CI runs for that push, and the change is unverified until a pull request is opened for it.
  3. Behaviour is unchanged. SKIP_GATE=1 still prints a message and exits 0; without it the hook still runs bun run gate and exits 1 on failure. Only words change, never control flow.
  4. A new test file test/pre-push-hook-message.test.ts pins the guarantee. It must fail at the merge-base and pass on the branch. It may read .githooks/pre-push as text and it may execute the hook with SKIP_GATE=1 in a temporary working directory, which is cheap because that path only echoes and exits. It must not execute the hook without SKIP_GATE=1, since that would run the whole merge gate inside the test suite.
  5. The test asserts the skip path positively as well as negatively: exit code 0, a message that mentions SKIP_GATE, and the absence of any claim that CI will enforce. Match on the claim, not on one exact sentence, so a reworded hook cannot reintroduce the false promise.
  6. No existing assertion is deleted, skipped, widened or re-toleranced anywhere. Existing tests that read .githooks/ must keep passing unchanged.
  7. bun run typecheck, bun run lint and bun run test are clean, with lint and test counts no worse than the merge-base baseline.
  8. The pull request body carries Closes #236, quotes each criterion above, and gives measured evidence per criterion.

Activity

  1. added
    bug
    documentation
    severity:low
    agent:ready
    on Nov 1, 2026
  2. ocsi-triager commented on Nov 2, 2026

    @ocsi-triager

    osi-spec-hash: 57b165ffd3dcf782 2026-11-02T23:36:49Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.

  3. added
    fix:working
    fix:pr-open
    and removed
    fix:working
    on Nov 2, 2026
  4. added 2 commits that reference this issue on Nov 3, 2026
  5. abogartz-opencode-self-improvement commented on Nov 3, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.11 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:readybugdocumentationfix:pr-openreleasedseverity:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions