Skip to content

docs: address round 3 of the latency and agent-surface review - #2626

Merged
mrsabath merged 1 commit into
mainfrom
docs/latency-review-round3
Oct 9, 2026
Merged

mrsabath merged 1 commit into
mainfrom
docs/latency-review-round3

Conversation

@mrsabath

@mrsabath mrsabath commented Oct 7, 2026

Copy link
Copy Markdown
Member

What & why

Follow-up to #2618, which carried rounds 1 and 2 of @huang195's review. His round-3 comments arrived on the PR shortly before it merged, so the fixes for them were never on the branch when it landed. This PR carries those five, unchanged from what was agreed in the threads.

Refs #2618. Every claim was re-checked against the cortex tree before the text changed.

IBM Bob does not get its CA from agentop

agentop configure bob enable writes one key, http.proxy, and no CA variable. cmd_bob.go states the reasoning outright:

The proxy is only half of it. Bob's requests are terminated by Cortex's TLS bridge, so Bob must also trust the bridge CA, and that is an OS trust-store change agentop does not make for you: it needs sudo, and a tool that silently escalates to alter machine-wide trust is not one you can audit.

So enable prints the sudo security add-trusted-cert command rather than running it. "The certificate authority is not trusted" previously said configure or exec "sets the certificate variable" — in the one section a Bob user reaches with a TLS error. They read that the CA is handled and go looking elsewhere, when the printed command is the whole cause. Corrected there and in the no-events checklist.

The whisker floor was wrong about the clamp

"A lower cap on the bottom row is clamped at zero" conflated two independent things in usage_whiskers.go:

  • the clamp is if r.lo < 0 { r.lo = 0 } (:47-49), so it fires only when mean − σ is negative
  • row placement is int((v/peak)*float64(plotRows) + 0.999) (:154) with plotRows = 10, so row 1 holds every value from 0 up to a tenth of the peak

A bucket with mean 3.0 s and σ 2.5 s under an 8 s peak has its lower cap at 0.5 s: row 1, nothing clamped. Now reads "falls in the bottom tenth of the chart", which is also honest that the floor is relative to the peak — under a 60 s peak, row 1 reaches 6 s.

Three smaller corrections

  • "Stop every stray supervisor by PID" is macOS-only. There is no supervisor on Linux, and the install that lost the port has already stopped, so a Linux reader hunts the ps output for a process that cannot be there. Now "any stray proxy", with the supervisor as a macOS aside.
  • "Another program stopped working" named two of the four replacing variables while naming git and curl, whose variables were the two it omitted. CURL_CA_BUNDLE and GIT_SSL_CAINFO are now listed. Also dropped "that sends other programs through Cortex", which describes a proxy variable and contradicts the trust-store cause that follows, and dropped ssh, which reads none of these four.
  • The Bob Shell row said it runs "Bob" through agentop exec, in a row whose purpose is to distinguish it from IBM Bob.

Acceptance tier

  • Tier 0 — Maintenance (bugfix / docs / dependency bump / no-behavior refactor)
  • Tier 1 — Standard feature (net-new user-facing behavior)
  • Tier 2 — Large / contested feature (new subsystem, cross-repo, high-risk, or disputed value)

Checklist

Pillar 1 — Code quality (all tiers)

  • make lint and pre-commit pass — pre-commit markdown and secret hooks pass. make lint was not run locally: it needs Xcode command line tools, which the sandbox this was authored in cannot reach. It fails identically on an unmodified tree there, so CI is the signal.
  • Tests added/updated and passing — n/a, prose only
  • Follows repo conventions
  • DCO sign-off on all commits (git commit -s)
  • (Tier 1+) Behind a feature flag, off by default — n/a

Pillar 2 — Documentation (all tiers; scope scales)

  • Docs affected by this change are updated — this PR is the doc change

Hai's third review on #2618, which approved the PR. Five comments, all his
own earlier wording coming back; each claim re-checked against the cortex
tree before changing the text.

- Bob does not get its CA from agentop. `configure bob enable` writes one
  key, http.proxy, and no CA variable: cmd_bob.go says the keychain is "an
  OS trust-store change agentop does not make for you", so enable prints
  the sudo command rather than running it. The TLS-error section said
  "configure or exec sets the certificate variable", which sends a Bob user
  looking for the cause elsewhere. That section and the no-events checklist
  now scope the claim to exec and give Bob its own sentence.

- The whisker floor. "A lower cap on the bottom row is clamped at zero" is
  still wrong: rowOf puts a value at int(v/peak*plotRows + 0.999), so row 1
  holds everything up to a tenth of the peak, while the clamp at
  usage_whiskers.go:47-49 fires only when mean minus sigma is negative. A
  bucket with mean 3.0s and sigma 2.5s under an 8s peak lands on row 1 with
  nothing clamped. Reworded to the bottom tenth of the chart, which is also
  honest about being relative to the peak.

- "Stop every stray supervisor by PID" is macOS-only. There is no
  supervisor on Linux, and the install that lost has already stopped, so a
  Linux reader hunts the ps output for something that is not there. Now
  "any stray proxy", with the supervisor as a macOS aside.

- "Another program stopped working" named two of the four replacing
  variables while naming git and curl, whose variables are the two it left
  out: CURL_CA_BUNDLE and GIT_SSL_CAINFO are now listed. Dropped "that
  sends other programs through Cortex", which fits a proxy variable and not
  the trust-store cause that follows, and dropped ssh, which reads none of
  these variables.

- The Bob Shell row said it runs "Bob" through agentop exec, in a row whose
  last sentence separates it from IBM Bob.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

@cwiklik cwiklik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Docs-only, three files, and every factual claim holds up. I re-checked each one against cortex origin/main (00cd25be) rather than against the citations in the description:

  • bobProxyKey = "http.proxy" is the only key configure bob enable writes (cmd_bob.go:30), and the sudo security add-trusted-cert command is printed rather than run, with cmd_bob.go:384-392 giving the reason it names ca.crt and not bundle.crt (the keychain is additive). Both rewritten passages match.
  • The whisker correction is right on both halves. The clamp is if r.lo < 0 { r.lo = 0 } (usage_whiskers.go:47), row placement is int((v/peak)*plotRows + 0.999) (:154), and plotRows = 10 (usage_render.go:33) — so row 1 holds (0, peak/10] and "the bottom tenth of the chart" is accurate. Keeping "the lower cap stops at zero" in the preceding sentence also covers rowOf's v <= 0 branch, which returns row 1 as well, so both ways onto the bottom row are described.
  • The four replacing variables now match agentop's managed set exactly — SSL_CERT_FILE, GIT_SSL_CAINFO, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE (cmd_exec.go:66-70) — with NODE_EXTRA_CA_CERTS correctly left out of the list because it is additive.
  • The supervisor change is right for the reason that matters to a kill: the second process is macOS-only (cmd_service.go:537-562, printed under runtime.GOOS == "darwin"). Linux does have an OS supervisor — a systemd user unit (cmd_service.go:50) — but not a PID in that ps output, and a plain kill there would be undone anyway. So "on macOS, its supervisor" is the correct qualification, even though the description's "there is no supervisor on Linux" is looser than the code.

Two non-blocking notes inline. One of them is about a release that has not shipped yet rather than about this text.

Author: mrsabath (MEMBER — maintainer)
Areas reviewed: Docs (3 files, +19/-18); cross-repo claim verification against cortex origin/main
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing (24 checks, Scorecard skipping)

Cortex writes its certificate authority to `~/.cortex/ca/ca.crt`. The `--claude-code` install
configures Claude Code for you. For another agent, `agentop configure` or `agentop exec` sets the
certificate variable. See [Other agents](../get-started/laptop.md#other-agents).
configures Claude Code for you. For another agent, `agentop exec` sets the certificate variables.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — accurate today, but this drops the one clause that happened to cover OpenCode.

The old text credited "agentop configure or agentop exec", and configure has a fourth target in cortex main: configure opencode enable "sets the nine variables agentop exec sets" (cmd_opencode.go:84-90), all five CA variables among them. The rewrite attributes certificate variables to exec alone, with IBM Bob as the only carve-out.

That is right for the surface this doc targets — laptop.md:111 carries a VERIFY v0.9.0 note saying the OpenCode paragraph switches to agentop configure opencode enable once the release carrying cortex#1243 is out, so configure is {claude-code, bob, bobshell} for now, and bobshell routes through exec anyway.

When #1243 lands, though, this sentence and line 372 each become wrong for OpenCode in the opposite direction: a reader with a TLS error is sent to exec when configure has already set the variables. The phrasing this replaced was future-proof there by accident; this one is not. Worth a VERIFY v0.9.0: marker here, in the idiom of the ones at :50 and :231 — the note at laptop.md:111 names only the OpenCode paragraph and would not lead anyone back to this file.

the proxy variable and the certificate variables. `agentop exec` sets both, and
`agentop configure` sets them for the agents it covers. See
[Other agents](../get-started/laptop.md#other-agents).
the proxy variable and the certificate variables. `agentop exec` sets both. For IBM Bob,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — the same OpenCode case as line 28. configure opencode enable sets the proxy and the CA variables (cmd_opencode.go:84-90), so once cortex#1243 ships this needs a second exception beside the Bob one. The clause this replaced — "agentop configure sets them for the agents it covers" — covered that without naming it.

pointed at `~/.cortex/ca/ca.crt`. That file holds only the Cortex CA, so every other host fails to
verify. Those variables need `~/.cortex/ca/bundle.crt`, which holds the Cortex CA and the platform
roots.
If `git`, `gh` or `curl` stops working after you install Cortex, the cause is a proxy or a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — gh reads none of these four on macOS, by the same reasoning that removed ssh.

gh is a Go binary, and Go's crypto/x509 consults SSL_CERT_FILE only under unix && !darwin; on macOS it goes to Security.framework instead. Checked on a macOS laptop rather than inferred: SSL_CERT_FILE=/dev/null gh api rate_limit answers normally, while SSL_CERT_FILE=/dev/null curl https://api.github.com fails to verify. It reads none of the other three either.

So on macOS gh reaches this section only through the proxy half of the stated cause, not the trust-store half the rest of the paragraph is about; on Linux it is right as written. git and curl are unaffected by this — each reads its own variable on both platforms.

@mrsabath
mrsabath merged commit 9dfc478 into main Oct 9, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants