Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; Descriptor-relative access and guarded check publication remain the authority for local state. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; Local state still uses the same guarded directory and receipt format. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 6cb497747def833d5fa47325de77770d606b7f8e, 62.2s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| return (False,) * len(names) | ||
|
|
||
|
|
||
| def read_local_state(wt: Path, name: str) -> str: |
There was a problem hiding this comment.
suggestion: Symlinked artifacts are reported as a raw ELOOP error, not a WorktreeError
read_local_state opens the file with O_NOFOLLOW but does not catch the error a symlink produces. When an artifact is a symbolic link, os.open raises OSError(ELOOP) and the user sees "[Errno 40] Too many levels of symbolic links". _regular_state raises a clear WorktreeError for the same case, so the two paths disagree. ready and status both reach this path through _current_check_report → _load_report, which has no local_state_files pre-check. _load_review turns the same OSError into "is not runner-produced: invalid saved review", which is misleading. The new tests only pass because "symbolic links" happens to contain "symbolic link". Smallest fix: in read_local_state, catch OSError with errno.ELOOP and re-raise the same WorktreeError(... is a symbolic link ...) that _regular_state uses. That gives one consistent message on every reader path.
| @contextmanager | ||
| def _local_state_directory(wt: Path, *, create: bool = False): | ||
| path = wt / ".loopzero" | ||
| if _git(wt, "ls-files", "-z", "--", ".loopzero"): |
There was a problem hiding this comment.
suggestion: The tracked-state check runs git ls-files on every local-state access
_local_state_directory runs git ls-files each time it is entered. One review invocation enters it several times: local_state_files, the task.md read, the saved-review read, and _save_review. This is why the expected git cost went from 14 to 17 for review, 7 to 8 for ready, and 7 to 8 for status. It is correct, but redundant within one command. A later cleanup could let callers that already validated the directory skip the repeat check, or cache the result per command. Not blocking.
|
@Mergifyio queue |
🚫 Left the queue · pull request manually dequeued1 min in the queue, with no time running CI. So far
Reason Pull request #1306 has been dequeued by the Mergify API To get back in the queue
Times in UTC · dashboard · how the merge queue works |
|
No description provided. |
Architecture-Review: unchanged; Repost now validates one private receipt snapshot for both review and publication. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 2c8f4408a58f07d58e82609273e7238d6cd5138f, 16.0s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
|
|
||
|
|
||
| def _load_review(wt: Path, head: str, kind: str) -> ReviewResult: | ||
| def _load_review(wt: Path, head: str, kind: str) -> tuple[ReviewResult, object]: |
There was a problem hiding this comment.
suggestion: _load_review's return type tuple[ReviewResult, object] is looser than it needs to be
The publication value is now taken from the same validated read as the result. This removes the second unguarded read_local_state call in cmd_review --repost, which could raise a raw JSONDecodeError or read a different file. That part is an improvement. The new signature types publication as object, but the only caller still checks its shape (isinstance(publication, dict) plus the repo, number and head comparisons). An optional fix is to annotate it as dict | None and validate the shape inside _load_review, so the publication format is checked in one place. This isn't blocking: the behaviour is correct as written. Exception routing is the same as before. CliError is not a ValueError subclass, so the head-mismatch message still reaches the user. FileNotFoundError is caught before OSError. WorktreeError from unsafe local state still propagates unchanged.
|
Delivery is blocked at Main then added the receipt diagnostics from #1294, which conflict with this reviewed head. The local integration at |
Confine local task state to the worktree
Context and goal
Closes #1027
Acceptance
Notes
Reject tracked state before using it as evidence. Check the state directory and direct child at the point of use. Use a directory descriptor for reads, writes and chmod so path replacement cannot redirect them.
Local validation
Head f1b3b86 passed 515 CLI cases. A readiness case failed during the full run and passed when rerun in isolation. The local state regression, worktree, and review receipt tests passed.
Base
Base: a4fa169
Validation
Recorded for
6cb497747defuv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review