On Windows, piped or redirected output uses the ANSI code page, so a
trace whose thread or slice names are not in cp1252 (a Japanese thread
name, for example) made the markdown digest stop with
UnicodeEncodeError after the work was done. stdout is now set to UTF-8
when the tool runs from the command line, as check_conventions.py does.
The --json output was not affected because json.dumps escapes non-ASCII.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
CONTRIBUTING.md says unimplemented exports call
NotImplemented_nid_no_patch(__func__), and 362 calls in core/ do. A stub
generated for a NID with a known name passed the NID string instead,
so its log line showed tNn5WBkta60 rather than sceAmprCommandBufferNop
and the output had to be edited by hand. Named stubs now use __func__;
stubs with an unknown name keep the NID, the only identifier they have.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
The pr-template check only accepted "Depends on: #N" or "none" on the same
line, so a checklist answering it as a bulleted list failed CI although
pr_overlap reads exactly that form (test_pr_overlap_dependencies covers
"Depends on:
- #2
- #3"). Allow one list marker before the first answer;
an empty answer is still reported.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
Check read every technical debt file and every changed file with its
own git show, so each run started one process per file: 99 git
processes for a typical pull request, 311 for a 118-file range, and the
count grew with docs/dev/debt. Process start-up dominates on Windows.
Read the blobs the checks use in one git cat-file --batch process,
keyed by the object ids ls-tree already returns, and batch the files
duplicates() inspects the same way. Paths that are not cached still go
through git show, so failures are unchanged.
Ninja Multi-Config writes one add_test per configuration and a final NOT_AVAILABLE one for the same name. The audit kept only the last, so every test executable was reported as never run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The doc-link check matched C++ lambdas such as `[](int a)` inside fenced
code blocks and inline code, reporting bogus missing targets. Links now
require non-empty link text, and links() strips fenced blocks and inline
code spans first. docs() also skips added lines that sit inside a fence
of the full file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use program headers when the section table starts at or beyond EOF. Keep rejecting tables that start inside the file but are truncated.
Cover imports, exports, full module audits, and extended section counts.
A weak import is optional: the entry stub leaves it unresolved and the loader sees null, so the title runs. The relinker now records the symbol binding in the call registry and import_audit skips weak imports when computing the current stop. regie5 (PPSA99520) weak-links sceLncUtilLaunchApp and was reported as stopping there while it runs past it.
On Python 3.9, Popen passes encoding=None, not "locale", to
TextIOWrapper, so simulated_cp1252 changed nothing and the encoding
regressions could not catch a missing encoding="utf-8". The stdout
newline test used Path.write_text(newline=...), which needs 3.10.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The relinker reads a plain ELF executable and skips SELF containers with a
warning, so an eboot.bin or a *.prx taken from a title cannot be relinked
before it is unwrapped, and the repository has no tool for that.
The inner ELF program headers of a container carry stale offsets: a SELF
inserts its own metadata blocks between the segments, so the data sits at the
offsets of the SELF segment-record table at file offset 0x40. The segments are
also packed without honouring p_align, while ELF requires p_offset % p_align
== p_vaddr % p_align, which the relinker enforces on guest modules. The tool
places the segments from the records, falls back to the vaddr to file mapping
of the containing PT_LOAD for segments the table does not cover, copies every
region to an offset satisfying the alignment, and refuses a container whose
load segments all look encrypted.
Expand AGENT_FILES in tools/check_conventions.py to include instruction and configuration files for modern AI coding assistants (.windsurfrules, windsurf.md, chatgpt.md, .chatgptrules, .aider.conf.yml). Add test coverage in tools/tests/test_check_conventions_agent_files.py.
git diff prints a file whose type changes (a file replaced by a link or
a submodule) as a deletion and a creation, two diff --git headers for
one --name-status entry, so the checker ran out of paths and stopped
with StopIteration instead of checking the pull request.
Co-Authored-By: Claude Opus 5.5 <[email protected]>