Skip to content

docs: correct four claims that contradict the code, and add CLAUDE.md - #5

Merged
VamikaSinghal merged 2 commits into
trace-cortex:mainfrom
roshantaneja:fix/route-parity-and-doc-currency
Aug 2, 2026
Merged

docs: correct four claims that contradict the code, and add CLAUDE.md#5
VamikaSinghal merged 2 commits into
trace-cortex:mainfrom
roshantaneja:fix/route-parity-and-doc-currency

Conversation

@roshantaneja

@roshantaneja roshantaneja commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Docs-only. Two commits, independently droppable. All findings were verified against the code before writing; specifics below.

The route-parity test that was originally part of this PR has been dropped — this branch now carries only the documentation corrections.

1. docs — four claims corrected

Where Was Evidence it was wrong
site/index.html:162 "ad-hoc signed … not yet notarized" The install steps 40 lines below, the README, and site/downloads/latest.json all say Developer ID signed and notarized. Three sources agree.
SETUP.md unittest discover CI deliberately overrides with pytest. conftest.py (only pytest loads it) pins the vault/DB to a temp dir at import time; under unittest discover the suite binds to backend/data/Cortex.vault and writes into the working tree.
.github/workflows/ci.yml comment conftest "provides fixtures" It declares none. The import-time env isolation is the whole job — it matters because backend.app.main builds a process-singleton store on first import.
docs/ARCHITECTURE.md hand-copied list of 42 tools TOOLS holds 110. query_memory and expand — both referenced by docs/CMP_PROTOCOL.md — were absent.

The tool list is replaced with the core ten, the group structure, and a pointer to mcp_tools.py as source of truth, rather than re-copying a list that will drift again. Also documents the tool-surface mechanism (Cursor caps at 40, ChatGPT at 128) and that surface is advertisement only, never authorization. Every tool name cited was verified present in mcp_tools.py.

2. docs — CLAUDE.md

Onboarding guidance for Claude Code sessions, covering what no single file teaches. The load-bearing entry: semantic near-dup, rerank, MMR and entity boost are all gated on provider != "hash", and hash is exactly what CI runs, since backend/requirements.txt doesn't install model2vec. A green CI run proves the deterministic skeleton, not the semantic system. That's a documented trade, not a bug — but it isn't written down anywhere a reader would find it.

Drop this commit if the repo would rather not carry an agent-guidance file.

Verification

  • scripts/check_docs_current.pystatus: ok
  • scripts/check_distribution_site.pystatus: ok
  • scripts/retrieval_eval.pystatus: ok
  • Full suite: no new failures. Local run shows pre-existing errors from an httpx/starlette skew under Python 3.13 (TestClient(app)Client.__init__() got an unexpected keyword argument 'app'), reproduced identically on a clean tree; CI pins 3.12.

Findings flagged, not fixed

Surfaced while surveying the two HTTP planes; no code in this PR addresses them.

  • /v1/imports/detect is shadowed on the FastAPI plane by /v1/imports/{import_id} (main.py:1716), so a hosted GET /v1/imports/detect resolves to fetch-by-id with import_id="detect" rather than 404ing. A real semantic divergence between the two servers. Worth a look independently of this PR.
  • Nothing compares the two servers. Cortex ships two complete HTTP servers over the same CortexStorestandalone_server.py (stdlib, what the packaged macOS app launches) and main.py (FastAPI, dev + hosted plane). test_fastapi_contract.py and test_standalone_server.py each exercise only their own surface, and the scripts/*_eval.py gates drive CortexStore in-process, so an endpoint wired into only one plane ships green while the other 404s. A parity gate would close this; it isn't in this PR.
  • test_macos_ui_quality_contract.py::MacOSSignInQualityContractTests::test_native_apple_button_is_full_width_and_entitlement_gated fails on main today — it asserts hasAppleSignInEntitlement appears in CortexCloudAuth.swift and it doesn't. Out of scope.

Deliberately not touched

  • site/downloads/latest.json is at build 51 while Info.plist is at 52. Regenerating it by hand would advertise a release tag/artifact that may not be uploaded — that belongs to package_release.sh.
  • api.trydoppl.com (status/.upptimerc.yml, deploy/macmini/setup.sh) vs api.signindoppl.com (deploy/README.md, cortex.env.example). I don't know which is correct.
  • site/downloads/distribution.json stale at build 22.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Aqpb9sHJt5A6UdotSR9Mcy

@roshantaneja

Copy link
Copy Markdown
Contributor Author

thank you for accepting!

@roshantaneja

Copy link
Copy Markdown
Contributor Author

@sarptandoven review pls

roshantaneja and others added 2 commits July 29, 2026 23:45
… docs

site/index.html contradicted itself on the same page: the Distribution
paragraph said "ad-hoc signed ... not yet notarized" while the install steps
directly below, the README, and site/downloads/latest.json all say Developer
ID signed and notarized by Apple. Three sources agree, so the paragraph was
the stale one.

SETUP.md documented `unittest discover` as the test command. CI deliberately
overrides that with pytest, because backend/tests/conftest.py -- which only
pytest loads -- pins CORTEX_DB_PATH/CORTEX_VAULT_PATH to a throwaway temp dir
at import time. Under `unittest discover` the suite binds to the default
backend/data/Cortex.vault instead, persists across runs, and writes into the
working tree. Matches SETUP.md to CI and says why.

The CI comment justifying that choice claimed conftest.py "provides fixtures".
It declares none; the import-time env isolation is the whole job, and it
matters because backend.app.main builds a process-singleton store on first
import. Corrected so the next reader doesn't inherit the wrong reason.

docs/ARCHITECTURE.md hand-copied the MCP tool list and had drifted to 42
stale entries against 110 in TOOLS -- query_memory and expand, which
docs/CMP_PROTOCOL.md references, were both absent. Replaced with the core
ten, the group structure, and a pointer to mcp_tools.py as source of truth,
rather than re-copying a list that will drift again. Also documents the
tool-surface mechanism (Cursor caps at 40, ChatGPT at 128) and that surface
is advertisement only, never authorization. Every tool name cited was
verified present in mcp_tools.py.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M12nsqf2Mw9cvEBeRiDBv1
…les to learn

Onboarding guidance for Claude Code sessions, focused on what is not
discoverable from any single file: the two-server split and its parity
footgun, vault-as-truth vs SQLite-as-disposable-index, the review approval
gate, the CMP/SMP invariants, and the hosted control plane that is built but
dormant in the local product.

The load-bearing one: semantic near-dup, rerank, MMR and entity boost are all
gated on provider != "hash", and hash is exactly what CI runs, since
backend/requirements.txt does not install model2vec. A green CI run proves
the deterministic skeleton, not the semantic system -- rerank_eval.py exits 0
with status=skipped when the model is absent, and only release packaging
enforces it via CORTEX_REQUIRE_MODEL=1.

Also records the two cross-cutting conventions that surprise people: the
Python tests that assert on the text of Swift/HTML/CSS sources, and the
docs-currency phrase gate.

Drop this commit if the repo would rather not carry an agent-guidance file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M12nsqf2Mw9cvEBeRiDBv1
@roshantaneja
roshantaneja force-pushed the fix/route-parity-and-doc-currency branch from 214848a to 0b31fe2 Compare July 30, 2026 06:45
@roshantaneja roshantaneja changed the title Close the two-server route-parity hole + correct four contradicted docs docs: correct four claims that contradict the code, and add CLAUDE.md Jul 30, 2026
VamikaSinghal added a commit that referenced this pull request Aug 2, 2026
Integrate PRs #5, #6, and #7: hardening and pairwise evaluation
@VamikaSinghal
VamikaSinghal merged commit 18c3fbb into trace-cortex:main Aug 2, 2026
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