DEV Community

Taylor Wang
Taylor Wang

Posted on

I Deleted Free From the Card and the Failure Picked a Side

I would open the notebook when a helper check fails and the only saved label is the word free. Had the suggestion drifted, or had the machine that ran the assertion changed underneath the same command? I could not answer either question from a log that says free, which means that log is a story. These notes are the forty-eight hour plan I would follow before I trust that kind of story again.

This notebook is a plan and a local recorder, not a measured study and not a quota report. If you need latency numbers, hardware names, or a ranked model list, you should stop here and go read primary docs. I would rather leave a field blank than borrow a number I did not print myself. Would you really ship a green check when the note cannot name the path that produced it?

Hours 0 to 12: one flag felt like enough

During the first half day I would write a helper that drafts a review comment and then runs one fixture test. My first sketch would use a single function called run_free, because both steps feel unpaid and therefore identical. That shortcut is the bug I already understand, even before I execute anything on a second machine. Can one boolean describe a model route and a server route without throwing away the diagnosis?

Hours 12 to 24: the replay could not choose a cause

On the second block of hours I would replay the same fixture and compare the two notes side by side. A different comment might mean the suggestion path answered differently than it did in the morning. A missing tool might mean the execution path was not the laptop I used when I wrote the fixture. If both explanations fit the same log line, I have not debugged anything, I have only renamed the confusion.

The split I would write down before hour thirty

Free model access means I may request a suggestion without paying for that request, under limits I still have to read. A free server option means I may run a job on a hosted machine without paying for that machine, under separate limits. I am taking those two availability claims as given for this exercise, and I am not treating them as a measurement. I still need the provider's current documentation before I treat either path as present on my own account.

Disclosure: This article was prepared as part of MonkeyCode's product outreach. I am using MonkeyCode only as the hosted example for those two choices, and I am not adding model names or hardware claims. If your account does not show one of those options, the card should store unavailable instead of a hopeful synonym. Would you rather pause the run than invent a path name just to keep the script moving?

Fields the card must answer

Keys I would require

I would keep each attempt in its own JSON file so a later diff cannot quietly overwrite the morning. The file has to answer a small set of questions before I allow myself to read the suggestion text. Boring keys are the point, because a clever schema is how I smuggle assumptions back into the note. Which of these could I still explain on Friday without reopening the chat that produced them?

  • suggestion_path: local, hosted-free-model, unused, or unavailable, and never the bare word free
  • execution_path: local, hosted-free-server, unused, or unavailable, chosen independently of the suggestion
  • provider_label: the label the tool printed, copied verbatim, or unreported when the tool stayed silent
  • command: the exact check I asked the execution path to run, stored as an argument list
  • started_at: a UTC timestamp from the machine that wrote the card, not a time I remembered later
  • exit_code: an integer, or null when the command never started because the card refused the paths
  • notes: one sentence about what I expected to learn, written before I look at the diff

Extras I would ban

I would also ban three tempting extras, because this notebook cannot honestly support any of them. No guessed model nickname, no pasted quota, and no hardware description belongs in the file. If the tool prints nothing, the provider label is unreported, which is a recorded fact rather than a hole. A hole invites me to fill it later from memory, and memory is how the word free returned last time.

The recorder I would run before I trust the note

The script below is a proposal you can run on your laptop, and it does not call a vendor API. I have not treated its output as a benchmark, and you should not paste its card into a status report as one. It refuses unknown path names, and it refuses unavailable, so a missing option cannot be blurred into local. I would store it as tools/path_card.py and aim it only at a fixture command I already trust.

#!/usr/bin/env python3
"""Write a two-path run card. Proposal: run locally; do not treat the file as a study."""

import argparse
import json
import subprocess
import sys
from datetime import datetime, timezone
from pathlib import Path

ALLOWED = {
    "local",
    "hosted-free-model",
    "hosted-free-server",
    "unused",
    "unavailable",
}

def parse_args():
    parser = argparse.ArgumentParser(
        description="Record suggestion path and execution path as separate fields."
    )
    parser.add_argument("--suggestion-path", required=True)
    parser.add_argument("--execution-path", required=True)
    parser.add_argument("--provider-label", default="unreported")
    parser.add_argument("--command", nargs="+", required=True)
    parser.add_argument("--out", default="run-card.json")
    parser.add_argument(
        "--dry-run",
        action="store_true",
        help="Write the card without starting the command.",
    )
    return parser.parse_args()

def require_known(name, value):
    if value not in ALLOWED:
        raise SystemExit(f"{name} must be one of {sorted(ALLOWED)}, got {value!r}")

def main():
    args = parse_args()
    require_known("suggestion_path", args.suggestion_path)
    require_known("execution_path", args.execution_path)
    if "unavailable" in (args.suggestion_path, args.execution_path):
        raise SystemExit("unavailable path; refusing to blur it into local or unused")
    if args.suggestion_path == "unused" and args.execution_path == "unused":
        raise SystemExit("both paths are unused; refusing to write an empty card")
    if args.suggestion_path == "hosted-free-server":
        raise SystemExit("suggestion_path cannot take a server role")
    if args.execution_path == "hosted-free-model":
        raise SystemExit("execution_path cannot take a model role")
    if args.suggestion_path == "local" and args.execution_path == "local":
        print("note: both paths are local; that is allowed, and it is not a hosted run")
    started = datetime.now(timezone.utc).isoformat()
    exit_code = None
    stdout, stderr = "", ""
    if not args.dry_run:
        completed = subprocess.run(args.command, text=True, capture_output=True)
        exit_code = completed.returncode
        stdout, stderr = completed.stdout, completed.stderr
    card = {
        "suggestion_path": args.suggestion_path,
        "execution_path": args.execution_path,
        "provider_label": args.provider_label or "unreported",
        "command": args.command,
        "started_at": started,
        "exit_code": exit_code,
        "stdout_tail": stdout[-400:],
        "stderr_tail": stderr[-400:],
        "dry_run": args.dry_run,
    }
    Path(args.out).write_text(json.dumps(card, indent=2) + "\n", encoding="utf-8")
    print(f"wrote {args.out}")
    return 0 if args.dry_run or exit_code == 0 else exit_code or 1

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

A check that rejects the bare word

Before I trust the longer script, I would run this classifier in a Unix shell, with no network and no fixture file. The word free is intentionally absent from the allowed set, so a lazy label fails in the open. A swapped role fails too, because a server path must not pretend to be the suggestion path. If this check ever starts accepting free, the rest of the notebook has already lost the point.

python3 - <<'PY'
allowed = {
    "local",
    "hosted-free-model",
    "hosted-free-server",
    "unused",
    "unavailable",
}

def classify(suggestion, execution):
    if suggestion not in allowed or execution not in allowed:
        return "reject-unknown"
    if suggestion == "hosted-free-server" or execution == "hosted-free-model":
        return "reject-swapped-role"
    if "unavailable" in (suggestion, execution):
        return "reject-unavailable"
    if suggestion == "unused" and execution == "unused":
        return "reject-empty"
    if suggestion == execution:
        return "named-pair-same"
    return "named-pair-split"

assert classify("free", "local") == "reject-unknown"
assert classify("hosted-free-model", "unavailable") == "reject-unavailable"
assert classify("hosted-free-server", "local") == "reject-swapped-role"
assert classify("unused", "hosted-free-server") == "named-pair-split"
assert classify("hosted-free-model", "hosted-free-server") == "named-pair-split"
print("path split checks passed")
PY
Enter fullscreen mode Exit fullscreen mode

Refusal, then a named local pair

I would prove the refusal before I prove the happy path, because a soft recorder is just a diary. These commands stay on one machine, and they do not require a hosted login to teach the habit. Watch the exit status, not the prose, since a friendly message can still hide a zero. Did the process actually stop, or did it write a card that flatters an unnamed path?

# Expect a non-zero exit, and expect no new card file afterward.
python3 tools/path_card.py \
  --suggestion-path hosted-free-model \
  --execution-path unavailable \
  --out cards/should-not-exist.json \
  --command python3 -m unittest tests/test_fixture.py
Enter fullscreen mode Exit fullscreen mode

When both paths are intentionally local, I still pass both flags, because silence is not a stored value. The output file should sit under cards, with a unique name, so a refusal cannot leave yesterday's success in place. Replace the example unittest path with a test module you already have, and do not invent a fixture just to see green. A card without a timestamp is exactly how two separate evenings collapse into one false memory.

mkdir -p cards
python3 tools/path_card.py \
  --suggestion-path local \
  --execution-path local \
  --provider-label unreported \
  --out cards/local-local.json \
  --command python3 -m unittest tests/test_fixture.py -q
Enter fullscreen mode Exit fullscreen mode

If I later have a hosted free server available, I change only the execution flag and I copy the printed label. I do not rename the suggestion path so the pair looks tidy, and I do not reuse yesterday's file. Same command, different path, new file: that is the whole trick, and it is smaller than it sounds. Would a tidy matching pair really be worth more to you than a pair that stays true?

A gate table for the second day

Before the second day's runs, I would read a gate table instead of negotiating with a diff. The table is not a ranking, and it does not claim that any hosted path is faster or safer. It only asks whether I can name each path today, with the wording the product actually showed me. If I cannot answer, the row says stop, which is a result I am allowed to keep.

Question I can answer today Suggestion path Execution path What I record
I only need a wording draft, and I will not run code hosted-free-model, if the account shows it unused Draft text plus the printed label, and no exit code
I already wrote the patch, and I only need a machine unused hosted-free-server, if the account shows it Command, exit code, and the printed label
I need both a draft and a check name it separately name it separately Two fields, even when both values are local
I cannot tell which path is offered right now unavailable unavailable Stop, and do not backfill a guess from memory

Notice that free never appears as a stored value, even though it is the word that started the confusion. The word can stay in conversation, but it should not survive into the artifact I will reread tomorrow. If a provider changes what an offer includes, older cards still name the path I believed I used. That is a weaker claim than a benchmark, and the weaker claim is the one I can defend.

Hours 36 to 48: what I would repeat

On the last block of hours I would replay three cases and write one plain sentence under each card. First I pass an unknown path string and confirm the script exits before it writes anything flattering. Next I run a fixture I already trust with both paths set to local, and I keep the card beside the output. Finally, only if a hosted option is actually offered to me, I rerun that same fixture and I refuse to merge cards.

The paper failure is already enough to change the habit, even if I never leave the laptop. A single free flag cannot tell me whether to reread a suggestion or to inspect the host that ran the check. I would repeat the split when both paths feel boring, because boredom is when I start abbreviating notes. Would a future version of me understand this file without the chat scroll that produced the wording?

I would also keep a rejection list beside the folder, written as checks rather than as slogans. Each line is a skip I would expect from myself when the evening runs long and the diff looks small. The list is short on purpose, because a long policy becomes another document I will not open. Which line would you be tempted to delete first, and what failure would that deletion invite back in?

  1. Do not retry a failed hosted run until the card shows which path failed and which path was never asked.
  2. Do not paste a suggestion into the execution command, because model text is untrusted input, not a shell program.
  3. Do not compare two cards that lack started_at, even when the command strings look identical on the screen.
  4. Do not treat a missing provider label as permission to invent one from a blog post or a memory.
  5. Do not ignore a missing interpreter, because that failure belongs to the execution path, not the suggestion.

Who should not use this notebook

Skip this notebook if you need a compliance review, a capacity plan, or a number you can publish. The card does not measure queue time, retention, or whether a free option will still exist next week. Skip it when the command might touch production credentials, because a free server is still a remote machine. You still have to authorize that machine on purpose, and a friendly price does not change that duty.

Skip it if you wanted a prompt that quietly picks a best model, since this workflow only records a choice you already made. I would also skip hosted columns when the work includes secrets, personal data, or an unreviewed shell string. Local-only cards remain useful, and they keep the same keys so a later hosted run does not invent a format. A consistent boring card beats a clever one I will not reread on the following Monday.

One hosted name, then back to the habit

If I already have a MonkeyCode account, I fill a hosted value only after that account shows the option I am about to use. The outreach note above is why this product appears here, and deleting the name should not break the recorder. I would rather file one honest card than collect another evening of notes that say free and mean two machines. That is the habit I would repeat, and it does not require me to pretend I measured a platform.

Top comments (0)