Skip to content

fix: correct clone URL and make setup.sh fail early on missing deps/keys - #1

Open
lgoyal6 wants to merge 1 commit into
trysurface:mainfrom
lgoyal6:fix/clone-url-and-setup-preflight
Open

fix: correct clone URL and make setup.sh fail early on missing deps/keys#1
lgoyal6 wants to merge 1 commit into
trysurface:mainfrom
lgoyal6:fix/clone-url-and-setup-preflight

Conversation

@lgoyal6

@lgoyal6 lgoyal6 commented Aug 15, 2026

Copy link
Copy Markdown

The quick start's first command clones from github.com/surface-labs, which has no
public repositories, so git clone exits 128 for everyone. Points it at trysurface.

While verifying that, three other things fail quietly:

  • setup.sh checks for the placeholder string, so deleting the ANTHROPIC_API_KEY line
    instead of editing it prints "ANTHROPIC_API_KEY looks set" and exits 0. It also
    exits 0 on the un-replaced placeholder, so setup.sh && run-pipeline.sh continues
    into the pipeline. Both now exit 1 with a message naming the fix, and all problems
    are reported in one pass. A key already exported in the shell satisfies the check.
  • .env.example line 2 puts "(optional, ...)" inside the value, so sourcing the file is
    a bash syntax error on the parenthesis. Moved to comments, matching the advice
    already in docs/troubleshooting.md.
  • run-pipeline.sh ran agent 01 before checking that the transcript path exists, so a
    typo cost a full agent run. The check now happens first.

Tested on macOS against bash 5.x and system bash 3.2.57: placeholder key, missing key
line, real key in .env, and key exported in the shell only.

The first command in the README clones from github.com/surface-labs, an
organisation with no public repositories, so the quick start exits 128 with
"Repository not found" for anyone following the instructions as written. The
repository lives under trysurface, and correcting that URL is the one change
that unblocks a new user.

Running the rest of the setup turned up three further problems, all of which
are quiet rather than loud. That is the more expensive failure mode, because
the script reports success in every one of these cases and the user only finds
out later.

setup.sh printed "ANTHROPIC_API_KEY looks set" and exited 0 even when the key
line had been deleted from .env, because it tested only for the presence of
the placeholder string rather than for an actual value. It also read .env
without exporting anything, so a key that existed only in that file never
reached the claude subprocess. The check now resolves the effective key from
the process environment first and .env second, distinguishes missing from
placeholder from present, and accumulates every problem it finds so the user
sees the full list in one run instead of fixing them one at a time.

.env.example line 2 is a bash syntax error if the file is sourced, which is a
natural thing for someone to try given how the surrounding instructions are
written.

run-pipeline.sh validated the transcript path only after agent-01 had already
run, so a misconfigured path burned a complete agent invocation before
failing. That validation now happens before any agent starts.

Verified under bash 5.x and under the system bash 3.2.57 that ships with
macOS, since the script uses arrays and the older shell is what a Mac user
will hit by default.
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