DEV Community

Morgan Xu
Morgan Xu

Posted on

Free Bench Drafts Need a Merge Captain

A free coding bench can draft a patch in minutes. That speed does not sign the merge decision. A named captain still owns every diff that lands.

Contribution weeks reward visible pull requests over careful ownership. Shared repos then fill with polished diffs and thin context. The failure looks like speed, yet the gap is custody.

A loaner workbench helps a carpenter shape a board. The shop stamp still belongs to the lead on shift. Free model access deserves the same shop rule during a rush.

MonkeyCode offers free model access and a free server option. Disclosure: This article was prepared as part of MonkeyCode's product outreach. Those two claims come from the operator for this draft.

This draft relies on operator notes rather than a public quota page. A reader should recheck terms on the day of any real trial. Stale numbers do not belong in a desk log.

This runbook does not assume quotas, hardware, or lasting availability. It also avoids invented model names and benchmark scores. The useful part is the custody ritual around the bench.

Two names, one log

The desk names one accountable human, not a crowd of equal pens. The drafter may use the free bench to propose a patch. The merge captain accepts, trims, or rejects that patch.

A log file watches the run and never edits the tree. That log is the witness for the whole desk run. It records scope, commands, and the captain stamp.

Handoff is a short walk between seats, not a long thread. The drafter leaves a scope slip beside the proposed diff. The captain reads that slip before opening the patch.

The slip names the repo, the branch, and the allowed files. It also names tests that must pass on a clean tree. Missing lines stop the handoff like a locked shop door.

Practice room, not the floor

The free server is a practice room, not the production floor. Drafts may run there when that option is actually available. Secrets, customer data, and deploy keys stay off that room.

A team that cannot separate those rooms should skip this desk. A solo maintainer who is also the only reviewer should skip it. Regulated trees need a second human outside this sketch.

The one-page run below is a proposal for a team wiki. It is not a record of a finished production rollout. A team can paste it and adapt seat names to the real roster.

# Merge desk - one-page run

Purpose. Keep a free-bench draft from landing without a named captain.

Drafter. May use free model access on the bench branch. May edit only files named in the slip.

Merge captain. Owns the diff, the push decision, and the final stamp. Must be a human.

Desk log. Holds the slip, the test output, and the stamp time. It is a file, not a third reviewer.

Start. The drafter creates desk/scope.md on the bench branch. The captain is named before the first model call.

Handoff. The drafter runs the tests and saves desk/test.log. The captain checks the slip, the log, and the branch. The captain then writes PASS or HOLD.

Stop. No push when the captain field is empty. No secrets on the free server. No claim of a fixed quota, a fixed machine, or permanent free access.
Enter fullscreen mode Exit fullscreen mode

A door card, then a gate

The page is short on purpose, like a door card in a shop. People ignore long manuals during a contribution rush. A door card stays visible when the queue gets loud.

The local gate is also a proposal, not a hosted control plane. It checks that the slip, the log, and the branch agree. It does not judge code quality or license risk.

#!/usr/bin/env bash
# Proposal only. Does not push, and does not call a remote API.
set -euo pipefail

slip="desk/scope.md"
log="desk/test.log"

test -f "$slip" || { echo "missing scope slip"; exit 2; }
test -f "$log" || { echo "missing test log"; exit 2; }

captain=$(awk -F': ' '/^captain: /{print $2}' "$slip")
branch=$(awk -F': ' '/^branch: /{print $2}' "$slip")

if [ -z "${captain}" ] || [ "${captain}" = "UNSET" ]; then
  echo "captain unset; hold the diff"
  exit 3
fi

current=$(git rev-parse --abbrev-ref HEAD)
if [ "${current}" != "${branch}" ]; then
  echo "branch mismatch: ${current} != ${branch}"
  exit 4
fi

echo "desk ready for captain review on ${branch}"
Enter fullscreen mode Exit fullscreen mode

The gate runs from the repository root after the tests finish. A missing slip exits with code two and a plain message. An unset captain exits with code three and holds the diff.

The slip exists before the first model call on the branch. The captain field stays UNSET until a human accepts the seat. That empty field is the lock, not a decorative label.

ticket: BENCH-104
repo: example/widgets
branch: bench/BENCH-104
captain: UNSET
allowed_files:
  - src/widgets/parse.py
  - tests/test_parse.py
forbidden:
  - secrets
  - deploy keys
  - production urls
tests:
  - python -m unittest tests/test_parse.py
Enter fullscreen mode Exit fullscreen mode

Allowed files should stay narrow, like a marked cutting area. A parser fix does not need a license edit in the same slip. Wide slips hide drive-by changes inside a friendly diff.

A dry-run helper

The captain can check the diff against that file list. The helper below is pseudocode for a local dry run. It was not executed against a live remote in this draft.

#!/usr/bin/env python3
"""Proposed dry-run helper. Unexecuted in this article."""
from pathlib import Path
import subprocess
import sys

def allowed_paths(slip: Path) -> set[str]:
    paths = set()
    in_list = False
    for line in slip.read_text().splitlines():
        if line.startswith("allowed_files:"):
            in_list = True
            continue
        if in_list and line.startswith("  - "):
            paths.add(line[4:].strip())
            continue
        if in_list and line and not line.startswith(" "):
            break
    return paths

def changed_paths() -> list[str]:
    out = subprocess.check_output(
        ["git", "diff", "--name-only", "HEAD"],
        text=True,
    )
    return [p for p in out.splitlines() if p]

def main() -> int:
    slip = Path("desk/scope.md")
    if not slip.exists():
        print("HOLD missing slip")
        return 2
    allow = allowed_paths(slip)
    extra = [p for p in changed_paths() if p not in allow]
    if extra:
        print("HOLD outside slip")
        for path in extra:
            print(path)
        return 3
    print("READY for captain review")
    return 0

if __name__ == "__main__":
    sys.exit(main())
Enter fullscreen mode Exit fullscreen mode

The helper prints HOLD when a changed path leaves the slip. It prints READY only when every path stays inside the list. READY still means the captain must read the diff.

The helper sees tracked diffs and misses untracked files. A captain still lists the working tree before PASS. Running git status remains part of the human read.

A sample command sequence keeps the ritual concrete. The sequence below assumes a toy repo that already has that test module. Nothing in the sample is a customer result or a measured score.

git switch -c bench/BENCH-104
mkdir -p desk
cp docs/scope.example.yaml desk/scope.md
python -m unittest tests/test_parse.py | tee desk/test.log
bash desk/merge-desk.sh
python3 desk/check_slip.py
Enter fullscreen mode Exit fullscreen mode

The tee line saves the test log beside the slip. The gate then refuses to bless a mismatched branch. That refusal is a pause, not a verdict on the patch.

A sample walk

A sample ticket shows the walk without pretending it shipped. The ticket is BENCH-104 on a toy parser in a sample repo. Nothing in that sample is a customer result or a benchmark.

The drafter asks the free model only about the listed parser bug. The prompt stays inside the slip, like a work order above the bench. The model may suggest a fix, and the drafter may edit it.

The drafter copies the command line into the desk log. The log names the test module and the exit status text. The captain then opens the diff and looks for extra files.

If the diff touches a changelog outside the slip, the stamp is HOLD. The drafter trims the extra file or widens the slip with a reason. Widening after the call is allowed only before any push.

Push remains a human command, not a hook this page installs. The bash gate prints a ready line and then stops. It does not call git push, and it should stay that way.

That limit matters on a shared machine with stored credentials. A ready line can tempt a tired captain to ship too fast. The page tells the captain to read the diff anyway.

Quiet failures

Failure usually starts when the drafter skips the slip. The diff looks complete, so the captain trusts the polish. Later the tree holds a change nobody meant to own.

Another failure is a captain named after the push. The stamp then records history instead of controlling it. The captain is named before the bench spends any model call.

A third failure is treating the free server as a vault. Availability is not the same thing as a security boundary. Tokens and production URLs stay on an approved secret store.

Free model access can still emit insecure or unlicensed code. The captain reads for both behavior and license fit. The captain records the license read in the desk log.

This desk is not a cover for bulk generated changes. The desk is not a tool for private repos or private data. Ordinary maintenance on a permitted tree is the whole scope.

Who should wait

Teams without a second reviewer should not adopt the page. Teams that need a fixed token quota should not invent one here. Teams that cannot keep secrets off the bench should wait.

The script can be wrong if the slip uses a loose glob. A glob that matches the whole tree defeats the cutting area. Explicit paths are safer until the team has reviewed the helper.

Time on the free server is not described in this runbook. Hardware shape and model choice are also left unnamed. Those facts belong to current product terms before any trial.

This page is a merge custody run, not a shift schedule. It does not assign on-call hours or batch quiet times. Those topics belong in other notes if the team needs them.

The captain stamp is a short line in the desk log. PASS means the captain read the diff and accepts the push. HOLD means the diff stays on the bench branch overnight.

Overnight is a figure of speech, not a measured service level. The team sets its own review delay outside this page. The page only insists that delay happens before the push.

Other tools can fill the drafter seat if the team prefers them. The custody rule does not depend on a single vendor name. The vendor mention here only marks where the free option fits.

Readers who already keep a wiki can paste the one-page run. They can trial the gate on a throwaway branch this week. That small trial teaches the custody gap better than a slogan.

Top comments (0)