mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-17 23:52:36 +00:00
Both were left open on #3207 as approach decisions rather than nits. Runtime cap: run-evolution.sh computed the budget in its own `uv run python -c` and passed a number, so the script's remaining provenance work and the CLI's own startup were spent by nobody and charged to the sweep — out of the upload reserve the cap exists to protect. The script now passes --max-runtime-from-instance-window and evolve reads /proc/uptime itself, on the line after it starts the clock the budget is measured against, so no interval exists to lose. Also removes an interpreter start from the script and lets --dry-run print the real argv. Reuse directory: _real_child_directory lstat-checked `transcripts` and returned its pathname, so a concurrent writer could rename the directory and leave a symlink before the name was used again — O_NOFOLLOW guards only the leaf. Every artifact is now resolved against a held descriptor: _open_real_directory opens with O_DIRECTORY|O_NOFOLLOW (check and open in one syscall), and _open_regular / _copy_owner_only take dir_fd. The reuse path is therefore POSIX-only; _require_openat says so and fails closed, which the runner already treats as "run a paid cell". _resolved_directory still tolerates a symlinked reuse root, unchanged and still tested. evolution._require_directory_chain is still lstat-per-component. It guards a different surface (candidate overlay reads) that neither review raised, so it is left alone rather than widened into here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||