Repository navigation
Description
Lane: openRepoProject-1
Filed on Brett Heap's word "all recommended" (2026-10-23T13:30:24Z), which adopted lane openRepoProject-1's recommendation to file this as one issue linked to #38. Probe agent P1 (lane openRepoProject-1) found it on 2026-10-23, while building the project status parity table for the design of change add-project-overview-family-relationships (draft PR #37, governing issue #36). That change does not touch status or doctor; this issue reports the existing path. Related: #38 (the same hole in main(), for a looping member link).
Defect
project status (and doctor, through the same snapshot()) ends in a Python traceback, with exit status 1, when a manifest holds a value that Python cannot convert. Two triggers, found by probing:
- A. A decimal integer of more than 4,300 digits in a manifest.
yaml.safe_loadraisesValueErrorwhile loading, inread_yaml(). Standard output is empty even under--json. - B. A lone surrogate in a manifest string that the human report prints. The string is written as the YAML escape for U+D800 inside double quotes. The human report cannot encode it, and
print()raisesUnicodeEncodeError.--jsonis not affected.
Reproduction (main at 15504f1; Python 3.12.3 and 3.10.18 alike)
A. Decimal integer over 4,300 digits
A projects directory P holding one family:
P/dec/dec/family.yaml # kind: family-manifest, name: dec, members: [{project: web}]
P/dec/web/project.yaml # kind: project-manifest, name: web, id: <a decimal integer of 5,000 digits>
PROJECTS_DIR=P project status dec --json
Observed: exit status 1, standard output empty, and on standard error (Python 3.12.3):
File ".../project", line 1142, in main
File ".../project", line 937, in inspect_project
File ".../project", line 854, in snapshot
File ".../project", line 827, in snapshot
File ".../project", line 426, in manifest
File ".../project", line 43, in read_yaml
File ".../yaml/constructor.py", line 263, in construct_yaml_int
return sign*int(value)
ValueError: Exceeds the limit (4300 digits) for integer string conversion: value has 5000 digits; use sys.set_int_max_str_digits() to increase the limit
Python 3.10.18 prints the same chain; its last line says "Exceeds the limit (4300) for integer string conversion". The same happens:
- without
--json, and forproject doctor dec,doctor dec --json; - when the number is in the holder's own
family.yamlunder an unknown key (note: <5,000 digits>), and when it is theidof a single project'sproject.yamlwith no family. So the key does not matter, and the family does not matter.
For contrast, in the same fixture shape a hexadecimal id of 5,000 digits (0x...) and a sexagesimal id of 3,000 parts (1:2:3:...) load as large integers and status and doctor exit 0 with the same output as a normal member, on both Pythons: project never reads id.
B. Lone surrogate in a printed manifest string
P/mname/mname/family.yaml # kind: family-manifest, name: mname, members: [{project: web}]
P/mname/web/project.yaml # kind: project-manifest, name: "\ud800" (the YAML escape, written with a backslash)
PROJECTS_DIR=P project status mname
Observed: exit status 1. Standard output holds the holder's four lines and stops before the member's line; standard error ends:
File ".../project", line 915, in walk
print(f"{indent}{item['name']} ({item['kind']}) — {item['root']}")
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position 2: surrogates not allowed
The same with the same escape in:
- the holder's own
name:infamily.yaml(project:915, position 0, standard output empty); - a leg's
role:in a member'sproject.yaml(project:928).
project doctor fails the same way, because it prints through the same print_report(). The run used LC_ALL=C.UTF-8. status --json and doctor --json exit 0 with the name written as "\ud800", because json.dumps escapes non-ASCII. (doctor --json exits 1 for the leg case only because its own check row reports a missing leg checkout.)
A member list entry project: "\ud800" does not reach the print: the name test at project:850 refuses it first, exit 2, "Invalid family member name in ", with or without --json.
Cause
- A.
read_yaml()catches only(OSError, UnicodeError, yaml.YAMLError)(project:44). PyYAML builds a decimal integer withint(value)(yaml/constructor.py:263), and CPython's integer-string-conversion limit (4,300 digits on both Pythons run) makes that raise a plainValueError, which is none of the three.main()catches onlyRefusedandOSError(project:1143), so the error escapes as a traceback.yaml.YAMLError,UnicodeErrorandOSErrorwere each tested withisinstanceon the caught exception: all false. - B.
print_report()printsitem['name'](project:915) and a leg'srole(project:928) with no guard. The UTF-8 encoder of standard output rejects a lone surrogate, andUnicodeEncodeErroris aValueError, not anOSError, somain()does not catch it either.
Expected
A clean refusal, as the other bad-manifest cases already give: exit 2 with a one-line message, and under --json the JSON error object the other refusals print.
- A.
read_yaml()turns aValueErrorfrom loading into aRefused("Cannot read : ..."). - B. The human report writes the string in an escaped form instead of printing it raw, or the manifest reader refuses a name that standard output cannot carry. The choice is Brett Heap's.
Notes
- Same family as project status and doctor crash with a traceback (exit 1, no JSON under --json) when a family member link loops #38:
main()turns onlyRefusedandOSErrorinto a refusal, so any other exception from a hostile value ends as a traceback with exit 1. project status and doctor crash with a traceback (exit 1, no JSON under --json) when a family member link loops #38 is the symbolic-link loop; this is two more inputs for the same hole. doctorwas run besidestatuson both Pythons: human and--jsonfor the family cases of A and B, anddoctorhuman besidestatus --jsonfor the two variant fixtures of A (the number under an unknown key, and in a single project).- The family-relationships proposal (OpenSpec: add-project-overview-family-relationships (family relationships in project overview; proposal only, an observation record) #37) gives the overview its own states for these inputs, so the overview will not share the crashes. This issue is only the existing
statusanddoctorpath. - Evidence: lane scratch
/workspace/projects/.scratch/openRepoProject-1-wave9-20261023/fx-p1/(fixture,scripts/,out/) and the report/workspace/projects/.scratch/openRepoProject-1-wave9-20261023/parity-probes.md.
Activity
brettheap commentedon Oct 23, 2026
CLAIMED — lane openRepoProject-1, session a0e10447-aab0-411d-8015-359674fb42ea@Eagle, 2026-10-23T13:34:36Z, for #39
Logged in
lanes/log/openRepoProject-1.mdatc1bd2a73c200436059ffeae497345c74bfb996bd.The three reads (lane-collision-protocol Rule 1):
brettheap commentedon Oct 23, 2026
Lane: openRepoProject-1
A third trigger (C): a deeply nested manifest. It is in the same family as A and B, and has the same hole in
main().A projects directory
Pholding one family, whose member's manifest nests a YAML sequence 1,000 levels deep:Observed on main at
15504f1, on Python 3.12.3 and on 3.10.18: exit 1, standard output empty, and standard error endingCause. PyYAML's composer recurses once per nesting level, while
read_yaml()is loading the file.RecursionErroris aRuntimeError; it is not one of the(OSError, UnicodeError, yaml.YAMLError)thatread_yaml()catches (project:44), andmain()catches onlyRefusedandOSError(project:1143). So, as with A, it ends as a traceback.Expected. The same as A:
read_yaml()turns it into aRefused("Cannot read : ..."), so the run gives exit 2 with a one-line message, and under--jsonthe JSON error object.Evidence. The lane scratch fixture is
/workspace/projects/.scratch/openRepoProject-1-wave10-20261023/fx-w3/: the build script is inscripts/, the 3.12 output inout/p1-312.err, and the 3.10 output in../p1-310.err. Both were run underenv -iwith fake owner tools first on PATH and every discovery root in the fixture. The fixture's digest was unchanged by the run, and no fake tool was called. It was found by review R4 of #37's design (R4-11) and confirmed by agent W3 (3.12) and by the lane lead (3.10).🤖 Generated with Claude Code