Repository navigation
docs(touched-files): cut the context down to current behaviour and invariants (#1355) - #1380
Merged
Merged
Conversation
…variants (#1355) State current behaviour, invariants and their reasons; drop dated measurements and history. Correct twelve statements the code contradicts (typeof reach, line cap unit, remote follow-up and GNU-flag scope, native-path use, plain-fallback reasons, read-only viewer, hard links, read options, refusal message, opened-row addition, refusal action scope). Section names cited elsewhere are unchanged.
Scope the in-repository hard-link refusal to reads that reach the repository guard, name the native .git-segment check, restore the cwd-trust and sensitive-path detail, limit the prefilter claim to extractTouches, and note remote rows refused before transport.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 9 of #1355:
.ai/contexts/touched-files.mdcut down to current behaviour and invariants, with their reasons. Rationale that only explains history, dated measurements and removal history are dropped; no behaviour change.changes-view.md"Not a repository" for theGIT_CEILING_DIRECTORIES/GIT_DISCOVERY_ACROSS_FILESYSTEMrules,viewer-panel.md"Local file actions" for theopen-pathviewer guard).file-panel.jsreaches the Touched view behindtypeofexcept inendCurrentTab, which callsopenTouchedPathandopenTouchedTabdirectly.line.length), not 4 MiB.unknown; rows refused before transport stayrefused..git-segment check on the native file path (hasGitSegment(canonicalPath)), not the comparison alone.TOUCHED_PLAIN_REASONS(invalid-path,mixed-eol,too-large,git,repo). That includes an oversized HEAD blob and any blob exit other than 0/128.createReadOnlyViewer, notcreateEditableViewer.hardlink) only when the read reachesresolveTargetInsideRepo. A rev-unsafe operand (for instance a root-level name starting with-), a failed reread or a plain discovery gives an editable plain pair, and its save writes the hard link in place.JSON.parseprefilter only guardsextractTouches. The cache scan parses every line under 32 MiB once, for its timestamp.verifiedTranscriptCwd). The worktree case is one example of a cwd that encodes to another folder.\\?\forms, fail closed), with a pointer toipc-bridge.md"Sensitive-path candidates".refusedwith no host answer.{editor: true, image: true}locally and{editor: true, sessionId}remotely.binary/encoding/too-largerefusals show "This file can't be shown here." for every origin. Remote lists show the reason text.'mcp'open of a stashed file over a dirty editor lists it as opened without a read.Docs
Agent docs only:
.ai/contexts/touched-files.md. No user doc changes, because behaviour is unchanged.no-changelog: agent documentation only, nothing users see.
Tests
node scripts/check-docs.js --validate: passed.node scripts/check-doc-refs.js: 0 failures.git diff --check: clean.check-pointers.js <worktree>, no exemption list): 26 citations, 0 failures. On a copy with "Stashed edits" and "Trust" renamed it reports 6 failures (exit 1).node --test --test-concurrency=1 test/git-locale-docs.test.jsunder Node 22.23.5: 1 pass. It pins this file's wording. It failed on an intermediate draft that wrapped "separate remote change" across two lines, and passed after the fix.Not verified
e2e/changes.spec.jsTouched journey not run).git-locale-docs.test.js.registerModaland its test, not re-run here.Kept
## Trust: the paths are attacker-influenced## Remote sessions (#454)## Shared editor (#450)## One route into Touched (#472)## Opened rows (#472)## Stashed edits (#472)## Markdown, formatted (#472)stat.id_rsa.pyrefusal, GNU-flag failures read asunknown, oversize refusal.openFilemessage omits the path.min-height: 0on the markdown preview.git-changes-file.js.stat.statand read..gitsegment is refused before probing.show-item-in-folderchecks run in their stated order.markdown:tests use the realmarked/DOMPurify.test/session-touched-cache.test.jsadded.