Skip to content

The operations guide says LOOM_CODE_GIT_CA_FILE sets trust, not reach - #1580

Open
KaloyanNaumov wants to merge 2 commits into
ClickHouse:mainfrom
KaloyanNaumov:pr/git-ca-file-docs
Open

KaloyanNaumov wants to merge 2 commits into
ClickHouse:mainfrom
KaloyanNaumov:pr/git-ca-file-docs

Conversation

@KaloyanNaumov

@KaloyanNaumov KaloyanNaumov commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Refs: #1537

TL;DR: Follow-up to #1549. The operations guide now says what LOOM_CODE_GIT_CA_FILE settles (trust, not reach), what the bundle applies to, and that its path is not checked at load. No behaviour change.

Changelog category (leave one):

  • Documentation

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The operations guide says that LOOM_CODE_GIT_CA_FILE settles trust but not reach, applies to every git a repository job runs, and is not checked when it loads.

Why

Follow-up to #1549, which merged at its first head. Review after the merge found the guide's paragraph reading more broadly than the code:

  1. The setting settles trust, not reach. In the sandbox the egress proxy (vet_host, public addresses only) still refuses a remote on a loopback, private or link-local address, and no setting admits one. A forge on a private address indexes only as an operator repository on a host without the sandbox. The guide now says so.
  2. "The CA bundles" said there are two. There are three: this setting, LOOM_CODE_GIT_PROXY_CA_FILE, and LOOM_CODE_GIT_PROXY_TLS_CA_FILE. The paragraph now names which one git uses through the proxy.
  3. The bundle applies to every git a repository job runs (the compiler tier's dependency fetches and submodule updates included), so it must hold the public roots when any of those reach a public host.
  4. The path is not checked when the setting loads. The guide asks for an absolute path to a file the job can see: the sandbox mounts /etc/ssl, /etc/ca-certificates and /usr read-only, /etc/ssl stays the suggested place, and a link works when its target is inside one of those trees. A relative or ~/ path, or a link whose target is outside them, fails in git's own words.

The unit test's import asyncio moves to the module top. Validating the path at load would be a behaviour change and is not in this PR.

Tests

  • tests/unit/test_gitrepo_ca_file.py and tests/unit/test_public_copy.py: the guide's two tests plus tests/unit/test_doc_links.py: 288 passed with the public-copy and doc-link suites. No test fails before this change; it adds no behaviour.
  • ruff check and format, mypy on the test file, prettier on the guide, and scripts/gates/function_length_gate.py pass.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code wrote the diff and the tests. Checked: I reviewed the whole diff and its tests; the gate runs listed under Tests are the agent's, against main at the same commit.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

Note

Low Risk
Documentation and test import reorder only; no changes to git or sandbox behavior.

Overview
Documentation-only follow-up to align the operations guide with how repository-job git actually uses TLS settings—no runtime behavior changes.

The LOOM_CODE_GIT_CA_FILE section now states the PEM bundle applies to every git invocation in a repository job (dependency fetches and submodule updates included), that Loom does not validate the path at load time (absolute paths under sandbox-visible mounts such as /etc/ssl), and that the setting controls trust only: sandbox egress still blocks remotes that resolve to loopback, private, or link-local addresses.

The “The CA bundles” subsection under git-through-a-forward-proxy is updated from two bundles to three, mapping LOOM_CODE_GIT_CA_FILE, LOOM_CODE_GIT_PROXY_CA_FILE, and LOOM_CODE_GIT_PROXY_TLS_CA_FILE to git’s http.sslCAInfo vs http.proxySSLCAInfo and when each applies.

In tests/unit/test_gitrepo_ca_file.py, import asyncio moves to the module top (style only).

Reviewed by Cursor Bugbot for commit 06978e4. Bugbot is set up for automated code reviews on this repo. Configure here.

… it does not

The guide's paragraph for LOOM_CODE_GIT_CA_FILE read as if the setting made a
forge under a private authority indexable. It settles trust only: in the
repository-job sandbox the egress proxy still refuses a remote whose name
resolves to a loopback, private or link-local address, and no setting admits
one, so such a forge indexes only as an operator repository on a host without
the sandbox. The guide now says so.

It also says what the bundle applies to (every git a repository job runs, the
compiler tier's dependency fetches and submodule updates included, so the
bundle must hold the public roots when any of those reach a public host) and
that the path is not checked when the setting loads: it must be absolute and
inside the sandbox's read-only /etc/ssl, and a relative or `~/` path, or a link
leaving /etc/ssl, fails in git's own words. The "CA bundles" paragraph now
counts three bundles and says which one git uses through the proxy.

The unit test imports asyncio at the top of the module. No behaviour changes.

Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 26, 2026 9:06pm UTC
loom-telemetry Ready Ready Preview Nov 26, 2026 9:06pm UTC

Request Review

@zlareb1 zlareb1 self-assigned this Nov 26, 2026

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The trust and network distinction matches the implementation. The CA-path instructions need one correction.

@KaloyanNaumov
KaloyanNaumov marked this pull request as draft November 26, 2026 20:49
@KaloyanNaumov

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Converting to draft while I address it; a new head and the replies will follow, so no need to look at this head again.

A link out of /etc/ssl can still work: the sandbox also mounts /usr and
/etc/ca-certificates read-only, so a link into /usr/share/ca-certificates
resolves to the same file. Say the target must be visible to the job and
keep /etc/ssl as the suggested location.

Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
@KaloyanNaumov
KaloyanNaumov marked this pull request as ready for review November 26, 2026 21:05

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The guide now covers symlink targets in the mounted certificate and system trees. The CA precedence and separate network checks match the Git job configuration.

This branch has not been deployed

No deployments
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.

2 participants