Skip to content

docs(privacy): say what auto-capture copies, tool by tool, in every project (#737, slice 4) - #968

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/737-orphan-artifact-sweep
Nov 10, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
fix/737-orphan-artifact-sweep

Conversation

@cdeust

@cdeust cdeust commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Tranche 4 de #737 (proposition 4, documentation). PRIVACY.md nommait l'interrupteur CORTEX_CAPTURE_MODE mais pas ce que copie un appel d'outil capturé. Le paragraphe ajouté sous What data Cortex processes le dit outil par outil, d'après mcp_server/hooks/post_tool_capture.py et _capture_mode.py sur main :

  • Edit, Write, MultiEdit, NotebookEdit, Bash : la réponse de l'outil si elle fait au moins 50 caractères (_MIN_OUTPUT_LENGTH), plus le chemin édité ou les 200 premiers caractères de la commande Bash (_reference_line) ;
  • Read, NotebookRead, Glob, Grep : seulement le chemin, le glob ou le motif, pas le contenu ni les résultats (_LIGHT_VALUE_TOOLS). C'est une précision par rapport au corps de l'issue, qui parle de sortie de Read copiée : le code ne la copie pas ;
  • WebFetch, WebSearch : la réponse si elle fait au moins 50 caractères ;
  • au-delà de 3000 caractères (GIST_BUDGET), un gist en base et le texte complet dans ~/.claude/methodology/artifacts/ ;
  • aucune exclusion par projet, aucune rédaction des données personnelles, et un artefact peut rester orphelin quand la capture est refusée après remise au worker ou au spool (cas que la tranche 1, fix(capture): an undelivered capture leaves no artifact behind (#737, slice 1) #907, ne couvre pas).

Refs #737 (pas Closes : les tranches balayage, exclusion par projet, purge par répertoire et nettoyeur optionnel restent ouvertes).

Type of change

  • Documentation only

Test plan

  • tests_py/hooks/test_capture_privacy_disclosure.py (nouveau, 6 tests) : lit les listes d'outils et les limites dans le paragraphe de PRIVACY.md, les compare aux constantes du hook, et passe de vrais événements à process_event (Read sans contenu, motif Grep copié, données personnelles stockées telles quelles, artefact + gist au-delà de 3000 caractères, troncature de la commande à 200).
  • Mutation manuelle : remplacer 200 par 150 dans PRIVACY.md fait échouer 1 test (vérifié, puis remis).
  • pytest tests_py/hooks/test_capture_privacy_disclosure.py tests_py/hooks/test_post_tool_capture.py : 20 passed.
  • python scripts/check_craftsmanship.py : OK. python scripts/check_doc_claims.py : OK.
  • ruff check / ruff format --check sur le fichier ajouté : OK.

Audit notes

  • Non vérifié : la suite complète et pyright (l'environnement n'a pas pu installer uv.lock : téléchargement de torch refusé par le proxy) ; tests lancés avec pydantic/numpy installés à la main.
  • Non vérifié : le texte est en anglais comme le reste de PRIVACY.md ; aucune relecture humaine du ton.

Reviewer checklist

  • CHANGELOG.md mis à jour (### Changed).
  • Documentation mise à jour (PRIVACY.md).
  • Pas de secret ni de donnée personnelle réelle dans le diff (noms d'exemple fictifs dans les tests).

Generated by Claude Code

…roject (#737, slice 4)

PRIVACY.md listed the CORTEX_CAPTURE_MODE switch but not what a captured
tool call copies. It now names, per tool group, what reaches the store
(response, first 200 characters of a Bash command, or only the path and
pattern of Read/Glob/Grep), the 3000-character artifact threshold, the
absence of a per-project exclusion and of personal-data redaction, and the
artifact a capture refused after hand-over can leave behind.

tests_py/hooks/test_capture_privacy_disclosure.py reads the tool lists and
limits from that paragraph and drives the real process_event against them.

Refs #737

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYtGV7jEBUYDhT7Dh6w
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T09:34:41.669143Z 05bb79a New commits
🔒 Security Review ✅ Completed 2026-11-10T09:40:10.580021Z 05bb79a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c79e53f5c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread PRIVACY.md Resolved
@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

PR #968 was updated after the trigger (c79e53f -> 05bb79a). Push again or mention Claude to run on the latest version.

@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Claude finished @cdeust's task in 2m 44s —— View job


Review of PR #968 (review 1 of 3) is done

  • Read the diff, including the fixup that answers the Codex P2 point about long Read responses
  • Ran five reviews (code quality, docs accuracy, security, tests, performance)
  • Posted the findings and verdict: review comment

There are no Blockers. I checked every claim in the PRIVACY.md paragraph and the CHANGELOG entry against the hook code, and none is false about security or behaviour. Three wording Notes are posted, none needed before merge. I did not run the test suite.

Verdict: approve

@claude

claude Bot commented Nov 10, 2026

Copy link
Copy Markdown

Review 1 of 3 — PR #968 (head 05bb79a)

Five reviews ran: docs accuracy, security, tests, code quality and performance. I checked every claim in the new PRIVACY.md paragraph and the CHANGELOG entry against post_tool_capture.py, _capture_mode.py, gist_extraction.py, artifact_store.py and capture_dispatch.py. None of them is false about security or behaviour. The fixup 05bb79a fixes the Codex P2 point: a Read response over 3000 characters is written whole to an artifact. It is now stated in the doc and pinned by test_a_long_read_response_is_copied_whole_into_an_artifact.

The new tests run the real process_event. The ARTIFACTS_DIR patch takes effect, because the path is read when write_artifact runs (artifact_store.py:58). The tests can't write to the real ~/.claude, because tests_py/conftest.py already points CORTEX_CLAUDE_DIR at a test directory. Every slow path (worker, spool, DB, cascade) is stubbed, and the test file is within the craftsmanship-gate limits. I did not run the suite here.

Blockers: none.

Notes, no action before merge

  • For Write and MultiEdit, "the tool's response" is the whole JSON dump (post_tool_capture.py:258), which includes the written content and originalFile. Edit stores the before/after strings (:243-253). Saying so would make the privacy impact explicit.
  • "A pattern or name typed in a command is copied even when the command prints nothing useful" is only true when the output reaches 50 characters. Empty stdout becomes _(no output)_, which is under 50, so the capture is skipped and the command is not copied (:70-71, :239-240).
  • "For the other tools…" can read as if every tool is captured. Tools outside the three lists (Task, TodoWrite, MCP tools) are never captured (:83), and one sentence could say so.

Verdict: approve

cdeust commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Les trois notes de la revue 1 restent hors de cette PR, conformément à la règle de revue (ADR-1119 : on ne pousse que sur un Blocker). Elles sont exactes, et je les reporte sur #737 pour la prochaine tranche documentaire : Write et MultiEdit stockent le JSON complet de la réponse ; une commande dont la sortie fait moins de 50 caractères n'est pas capturée du tout ; les outils hors des trois listes ne sont jamais capturés.


Generated by Claude Code

@github-actions
github-actions Bot merged commit b3ecf6a into main Nov 10, 2026
18 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 10, 2026
…973)

* docs(agents): state the CI contract every agent and routine follows

The scheduled routines were written before the review contract: on
2026-11-10 they measured branches against the main branch and rebased
them with a forced push, commented on approved pull requests (#968) and
opened pull requests while another was in flight (#971, #972). Their
prompt tells them to read CLAUDE.md and docs/ and to apply the
repository's standards, so the rules "Review rounds" does not hold yet
are written next to it, and both are said to win over a less
restrictive routine prompt.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYsWnKSjpX4oNV19PCF
Signed-off-by: Claude <[email protected]>

* docs(agents): rule 1 names the two merges the verdict does not decide

Notes of review 1 of #973, taken in one push because that review's
verdict cannot be read by the resolver (its comment does not link the
run, fixed for later reviews by ADR-1130, #975): the low-risk Dependabot
merge and the "do not merge" title, and what a pull request cut down
after its third review waits for.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYsWnKSjpX4oNV19PCF
Signed-off-by: Claude <[email protected]>

---------

Signed-off-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
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