Repository navigation
feat(trace): a contract action can match writes that add a file or modify one #1408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
a385c9e
feat(trace): a contract action can match writes that add a file or mo…
napetrov f48cbdc
fix(trace): a refused write gets no label, a failed shell redirect co…
napetrov f948133
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov f6e3502
Preserve normalized read and edit failures
napetrov a0f4b3c
Identify shell writes by their known directory
napetrov cc34513
Reject explicit empty contract change filters
napetrov 96d34ae
Recognize grouped tee append options
napetrov fba2384
Keep directory uncertainty across trace forms
napetrov 1c0e8a6
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov 6e82b79
Type the optional trace directory
napetrov 48d5578
Require split traces for write change contracts
napetrov 18f02f0
Detect shell directory changes past prefixes
napetrov 82e79fd
Check assignment prefixes before removing quotes
napetrov ba0ab66
Track shell quoting inside assignment values
napetrov 02db372
Respect explicit CDPATH in write directory tracing
napetrov 3746c00
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov af0ecdf
Keep fallback cd from anchoring shell writes
napetrov 0eae906
Report inconclusive write contracts
napetrov 7b1b792
Preserve cwd during literal virtualenv activation
napetrov 7aa6eed
Account for subagents that may change cwd
napetrov 8933b9b
Leave normalized repo write type unlabelled
napetrov 6484896
Carry explicit CDPATH through a Bash call
napetrov 7fd1b6d
Share shell movement classification for functions and loops
napetrov 68fa485
Record resolution of review summary
napetrov 2619d0b
Handle quoted and redirected CDPATH assignments
napetrov 2c3c6a5
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov b757ff6
Preserve cwd across a subshell function definition
napetrov e89f27d
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov 850d928
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov ef220ef
Merge commit '35dfeb87aced4e5998ddb7ff0c1ed9eac1b9ca97' into HEAD
napetrov e10e570
Merge branch 'main' of https://github.com/intel/dokimi into HEAD
napetrov cd77c26
Merge commit 'e1f774049b300d23ef0565f625248076c301e47b' into HEAD
napetrov fabd7fd
Keep write-contract tests together after main sync
napetrov 68c624e
Merge commit 'bcb1f9f0927b5cea32d6b08797ac8e58142c4cf6' into HEAD
napetrov ce74fb3
Treat unsupported trace working directories as unknown
napetrov d3002b1
Check the count of passing runs that broke a contract
napetrov 3664a14
Check partial JSON status for unreadable traces
napetrov d3034e9
Cover in-place edits with an unknown directory
napetrov 571aa24
Leave variable-expanded shell write identities unknown
napetrov be10b63
Report expanded replacement targets as inconclusive
napetrov 4b8ec94
refactor: split in-place edit operand parsing
napetrov 2bd133d
Merge remote-tracking branch 'intel/main' into HEAD
napetrov 716c3f9
fix: leave relative trace paths unresolved without a cwd
napetrov 0dd320b
perf: locate background shell groups in one scan
napetrov 1b07588
fix(trace): an Edit with an empty old_string that creates a file is a…
xaleryb 2a91623
fix(trace): a glob or ~ write target is an expanded path with no label
xaleryb 7f94cae
Merge remote-tracking branch 'intel/main' into HEAD
napetrov cb3e7aa
fix: account for every tee output in change contracts
napetrov 3401d0a
fix: stop reading tee operands at shell syntax
napetrov a66c18d
Merge commit 'refs/pr-address/base/main' into HEAD
napetrov 8fd8902
fix(trace): account for unresolved write paths
napetrov 18ff6c4
fix(trace): reset cwd after function definitions
napetrov 7c04d42
Merge commit 'refs/pr-address/fallback-a/main' into HEAD
napetrov c8e0279
test(cli): supply an agent run fault fixture
napetrov 315970b
Merge commit 'refs/pr-address/followup/1408-main' into HEAD
napetrov 9f317b3
Treat shell brace expansions as unknown write paths
napetrov 21bb79b
fix(trace): treat a labelled write with an unknown path as a possible…
vlad-perevezentsev f06a42c
docs(changelog): note labelled writes with unknown paths
vlad-perevezentsev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
dokimi/changelog.d/20261125_210000_napetrov_contract-modifies.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Added | ||
|
|
||
| - **A contract action can say a write added a file or modified one**: `trace consistency --contract` takes `change: add` or `change: modify` on an action, so `forbids: new_test` (`change: add`, `file_path: 'tests/'`) flags new test files and leaves edits to existing ones alone. The trace labels each write from the calls before it: `Write`, `>` and `tee` to a file no earlier call read or wrote are `add`, `Edit`, `MultiEdit`, `sed -i`, `>>` and `tee -a` are `modify` (an `Edit` with an empty `old_string` creates the file and is labelled like `Write`). The label is read from the trace only, so a file that existed and was never read in it can be labelled `add`; see the limits in `docs/run-consistency.md`. A run is reported as inconclusive when an unlabelled replacement, or a labelled write whose path is unknown, could change its contract verdict. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.