Skip to content

Decode architecture check paths as filesystem names - #1213

Merged
mergify[bot] merged 1 commit into
mainfrom
lean178/1191-architecture-path-bytes
Nov 26, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
lean178/1191-architecture-path-bytes

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Decode architecture check paths as filesystem names

Context and goal

  • Goal: The architecture check runs when an unrelated filename contains an invalid UTF-8 byte.
  • Problem: A strict text decode aborts the check before it can decide which paths are watched.
  • Context: Git's NUL-delimited name lists carry the original pathname bytes.

Closes #1191

Acceptance

  • The check passes with a raw invalid UTF-8 byte in an untracked filename and again after staging it.
  • A watched change still requires an architecture guide update or a reasoned trailer in that repository.

Base

Base: a4fa169

Notes

  • Both raw filename cases first failed during UTF-8 decoding. The regression also checks that a watched change still fails.

Validation

(no loopzero check run recorded)


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 5d64b01, approve

Architecture-Review: unchanged; the same watched paths and trailer requirements apply after pathname decoding.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics 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.

loopzero primary review by claude on 5d64b010e82e897024d919e1f0846f4cbde29adb, 13.4s: 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.

text=True, capture_output=True, check=False)


@pytest.mark.skipif(sys.platform != "linux", reason="requires raw pathname bytes")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Linux-only skip does not cover filesystems that reject non-UTF-8 names

The skip only checks sys.platform. On a Linux filesystem that requires UTF-8 names (for example ZFS with utf8only=on, or some casefolded or encrypted mounts), write_text on caf\xe9.txt raises OSError and the test fails instead of being skipped. Smallest fix: try creating the file first and call pytest.skip on OSError/UnicodeEncodeError. This is non-blocking. The fix itself is correct: git ... -z emits raw, unquoted path bytes, and os.fsdecode with surrogateescape keeps them round-trippable. WATCHED and INTERFACES contain only ASCII names, so set membership is unaffected. The test fails before the fix because the strict decode raised UnicodeDecodeError, which main turns into a FAIL, and it also checks that a watched change still fails.

@eowca
eowca marked this pull request as ready for review November 26, 2026 00:57
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as db7db7d at 01:43 UTC

4 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 01:39 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1319
  • ✅ Merged 01:43 · db7db7d · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit db7db7d into main Nov 26, 2026
14 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1191-architecture-path-bytes branch November 26, 2026 01:44
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.

Allow non-UTF-8 Git path bytes in the architecture docs check

1 participant