Skip to content

test(architecture): pin UTF-8 fixture I/O and tolerate unprivileged symlinks - #6234

Open
JasonBuildAI wants to merge 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/arch-windows-portability-p3w9
Open

JasonBuildAI wants to merge 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/arch-windows-portability-p3w9

Conversation

@JasonBuildAI

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

Native Windows contributors whose ANSI code page is not UTF-8 (e.g. zh-CN/cp936) and who cannot create symlinks get 12 red tests/architecture checks that fail before reaching any assertion, so the vocabulary-drift and RFC-governance guards cannot be trusted as a local pre-push signal on a supported platform; after this PR the same suite is green on such a host with no behavior change on UTF-8 hosts or CI.

Author Declaration

  • Written by: model_agent (OpenAI Codex CLI agent) operating the JasonBuildAI contribution account.
  • AI disclosure: this change was drafted with AI assistance at my request, under my direction and review.

Implemented against

Criterion (spec clause) Disposition Symbol / path Test or command
Issue #6233: tests/architecture passes on native Windows with cp936 locale and no symlink privilege implemented tests/architecture/test_semantic_production.py, tests/architecture/test_contributor_task_board.py, tests/architecture/test_rfc_status_index.py, tests/architecture/test_semantic_inventory.py uv run --extra test python -m pytest tests/architecture -q -> 1432 passed, 1 skipped
Fixture text I/O no longer lets the host locale decide how repo content is decoded, or writes fixture content the UTF-8 owner cannot read implemented same four files (encoding kwargs only) before/after comparison in Validation rows
The symlink rejection arm still runs wherever symlink creation is possible implemented test_semantic_inventory.py::test_tracked_symlink_cannot_read_untracked_source skip only on OSError from symlink_to; unchanged body runs on ubuntu CI
  • Self-check before submission: ran the full architecture suite on the same commit with the diff reverted and re-applied (git apply -R, reverted after capture), ran the four files under PYTHONUTF8=1 to simulate a UTF-8 host, and ran ruff check on the changed files. Did not touch product code, dependencies, or unrelated tests.

Scope And Continuation

  • Completed scope and remaining work: complete within this scope. The audit is bounded to tests/architecture; other suites were not swept for the same host-codec pattern and no failure was observed outside this directory.
  • Slice boundary / successor: N/A - the suite is the whole surface this change serves.

Validation

  • Tested revision: cbc00b6
  • Run state: finished
  • Input classes: synthetic, public_fixture
Check kind Result Public-safe evidence / limitation
unit passed uv run --extra test python -m pytest tests/architecture -q on Windows/cp936, Python 3.12: before 12 failed, 1421 passed; after 1432 passed, 1 skipped.
regression_parity passed Same-commit baseline (diff reverted with git apply -R) vs fixed head; PYTHONUTF8=1 run of the four affected files: 90 passed, 1 skipped, i.e. UTF-8 hosts see no behavior change.
static passed uv run --extra test python -m ruff check over the four changed files -> All checks passed!
integration not_run The symlink arm cannot execute on hosts without symlink privilege; the unchanged test body runs in the existing ubuntu python-tests workflow.
  • Coverage and gaps: the 12 previously failing checks cover every changed call site; the symlink assertion is skipped only where the OS refuses symlink creation (CI covers it). No product code, CLI, or API surface is affected.

Frontend / Visual Evidence

  • UI impact: none

Type of Change

  • Test update

LoopX Area

  • Build, packaging, installer, or CI

Technical Direction

  • Direction / acceptance reference, when applicable: N/A

Shared-authority RFC fixture impact

N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

…ymlinks

tests/architecture reports 12 host-dependent failures on a native Windows
checkout whose ANSI code page is not UTF-8 and where symlink creation is not
permitted (no Developer Mode / elevation); none of them reaches the assertion
it exists to check (loopx-project#6233):

- test_semantic_production.py: read vocabulary_v0.json as UTF-8
- test_contributor_task_board.py: read/write the copied RFC as UTF-8
- test_rfc_status_index.py: write fixture RFC headers as UTF-8, matching the
  generator under test which already reads UTF-8
- test_semantic_inventory.py: skip the tracked-symlink fixture only when the
  host cannot create symlinks, matching the existing house pattern

Evidence on upstream main 43643a5, Windows / cp936 / Python 3.12:
before: 12 failed, 1421 passed; after: 1432 passed, 1 skipped (symlink test
skipped on this host; still runs on CI). UTF-8 mode run of the affected files:
90 passed, 1 skipped. ruff check: clean.

Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
JasonBuildAI added a commit to JasonBuildAI/loopx that referenced this pull request Oct 11, 2026

This branch has not been deployed

No deployments
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.

[Bug]: tests/architecture reports 12 host-dependent failures on native Windows (cp936 locale, no symlink privilege)

1 participant