Skip to content

Claude/upgrade ape c library mm z gd - #608

Merged
staalmannen merged 2 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd
Oct 7, 2026
Merged

staalmannen merged 2 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

No description provided.

claude added 2 commits October 7, 2026 18:02
Total 68118 Passed 62159 Skipped 5916 Failed 43, marker, exit 0, 167
files, tcl::test 9.0.3 present. Total and Skipped are identical to the
digit against the recorded 62156/46, so Passed +3 / Failed -3 is one
statement about the same 68118 executions.

All 43 names are now recorded in docs/notes/tcl-suite.md with the
extraction command beside them. Their absence is what kept the per-name
question open for rounds while every comparison was made by total --
this file's own rule says compare per name, never by total, and no list
existed to compare against.

Three fixed, nothing broken, all three named: chan-io-41.8,
expr-old-37.21 and unixFCmd-2.2.2, three of the eleven recorded unread
singletons. Three gone and the net is three, so nothing arrived. None
was predicted or being worked on, so the vehicle is unidentified and
naming one would be a guess.

Both questions the -J round left open are answered. socket_inet-5.1 and
5.3 are still failing, so they were not among the eighteen and the
leftover-listener false pass did not return. event.test and main.test
are event-1.1 and Tcl_Main-5.10, unchanged rather than new.

AND THERE IS NO socket_inet.test. The -J round recorded that it had
"left the failing-file list entirely" and offered that as the
behavioural confirmation that -J had not broken the socket half of its
own blast radius. The suite has one socket.test, whose body is
`foreach {af localhost}` with `test socket_$af-1.1`, so every
socket_inet-* name is generated with $af = inet; a grep for
socket_inet-5.1 matches no file in the tree. Its absence from the list
could not have been anything else under any outcome, and socket_inet
still has four failures (2.11, 5.1, 5.3, 7.3) -- the same four already
listed as unread. The eighteen stand on the totals; the attribution to
sockets does not, and with the pthread half skipped the behavioural
confirmation of -J covers neither family it moved.

New method rule: a name absent from a list is not a measurement until
you have checked the name could ever have appeared there.

Also corrected: zipfs is five zipfs-password-* cipher tests where the
notes recorded three -- one family sized from a prediction rather than
counted from the names.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
It is three products rather than one, and `main' settles that rather
than taste: src's 75 files hold exactly one (cfe.c), so they are one
binary; util's seven hold six, plus decode.c with none, which is
edg_decode's second object; lib_src's 51 hold none, so they are a
library. So sys/src/ape/lib/edg builds libedg.a with mksyslib and
sys/src/ape/cmd/edg builds cpfe with mkone. util is six small
binaries and blocks nothing, so it is not written yet.

Neither is added to cmd/mkfile's lists: one failing entry aborts the
whole tree's mk, which is why basic and c++lib are commented out
there. Build by hand first.

Order is a dependency, not a preference. lib/edg first, because an
archive sidesteps the link model entirely -- ar takes duplicate
members and the clash only arrives at a link -- so it answers "does
pcc compile EDG's generated C" with nothing else in frame. Then
cmd/edg, where the compile of a 315,616-line translation unit
(src/sys_predef.c) and the 3,094 duplicate COMDAT symbols both land.
Run it as `mk -k': Plan 9 mk stops at the first failing recipe, so a
plain run costs one round per bad file across 75 files.

cpfe has no LIB=, and that is a question rather than a claim. It is
itself a translated C++ program so it may want EDG's own runtime, and
reading cannot settle it: src holds 145,752 distinct _Z-prefixed
tokens, nearly all names it defines itself, with ordinary identifiers
like _ZERO among them. Only the link says which are undefined. It is
not obviously needed -- EDG is built -fno-exceptions -fno-rtti and src
references none of _Znwm/_Znam/_ZdlPv/_ZdaPv, __memzero or
__abort_execution -- so the first link is the measurement and the fix,
if any, is one line naming libedg.a. That is the second reason to
build the library first.

Checked rather than assumed, because this tree has paid for it: the
runtime adds nothing libap already provides. lib_src holds exit.c,
main.c, error.c and memzero.c, which is the gnulib strerror shape --
but every definition there is _Z-mangled or __-prefixed (exit.c
defines _Z4exiti, memzero.c defines __memzero) and the plain C names
appear only as declarations, so they resolve to libap rather than
replacing it. The filenames read alarmingly and the definitions do
not.

Also measured: EDG bakes in no struct sizes at all -- zero
`sizeof X == N' markers against cfront's 132 -- because it emits real
sizeof expressions, so kencc computes every layout and cfrontsz-probe's
class of problem does not recur. CFLAGS is -c alone so nothing is
quieted on the first run; no -I or -D is needed because each file is a
whole lowered translation unit that declares everything it uses, down
to its own memcpy with kencc's size_t.

Both OFILES lists are sound and complete: 51 and 75, no name missing a
file and no file missing from a list. mkcont-sweep 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen
staalmannen merged commit 9d2cab6 into main Oct 7, 2026
1 check passed
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.

2 participants