Commit Graph
1584 Commits
Author SHA1 Message Date
RRFZ d0f7673956 Keep recovered module paths distinct after hash collisions (R3.12) (#1529)
Recovered modules are named after their sanitized id, and a collision added eight characters of the content hash once. Three modules with the same id and body gave the second and third the same path, so extraction refused the third and left that module out; a later module's id could also equal an earlier generated name. Each generated name is now checked against the names already used: the first collision keeps its existing name, and any further one gets an occurrence suffix.
2026-11-11 00:14:21 +07:00
Afloat db9dd54e47 Keep incomplete Android manifests partial in tool evidence (R3.12) (#1535)
The binary XML reader marks a recovered or capped manifest as truncated, but android_package_show dropped that flag and called its evidence complete, counted by the APK's ZIP entries, even when the manifest was missing or unreadable. android_components_list also reported complete coverage on the last page of a recovered manifest. Package evidence is now complete only when the manifest read in full, and component pages of a truncated manifest stay partial, with no claimed total and next_offset kept for paging.
2026-11-11 00:07:52 +07:00
Afloat b5faea074b Distinguish certificate-chain cycles from the walk limit (R3.12) (#1537)
A short certificate cycle ran out of supplied certificates and was described as reaching the 16-link walk limit, and a cycle of exactly 16 certificates read the same way. The walker now looks at the next certificate at the boundary before deciding why it stopped: a repeated certificate reports a loop, and a new one beyond 16 verified links reports the walk limit. No 17th link is added or verified, and a root reached at link 16 still completes the chain.
2026-11-11 00:07:45 +07:00
Afloat 68ba5239a8 Bound generated source-map lines across inline sections (R3.12) (#1533)
The segment budget didn't count empty generated lines, so a small source map made of semicolons could exhaust memory without a single segment, and each inline section allocated again. A generated-line budget (1,000,000 by default, shared by all inline sections) now counts empty and final lines and refuses a map that goes over with TooManyLines. The line index is reserved fallibly and reports LineAllocationFailed when memory can't be had. Generated coordinates, the segment limit and external sections are unchanged.
2026-11-11 00:06:06 +07:00
Cr 21dead85f4 Decode Swift metadata cache, reflection and Objective-C class symbols (R3.12) (#1531)
Swift binaries carry compiler-generated metadata symbols ending in M and one of K, D, F, A, P, B, U, t or s. The demangler stopped at the second letter and reported all of them invalid ("unsupported metadata kind"), about 206,000 symbols across macOS and Xcode system binaries. Each now reads as swift-demangle prints it: metadata instantiation caches, demangling cache variables, reflection field, associated-type and builtin descriptors, generic metadata patterns, and Objective-C metadata update functions and resilient class stubs. An operand that isn't a type where one is required is still refused.
2026-11-10 23:58:48 +07:00
RRFZ 097bcbc369 Insert YAML server tables before the document ends (R2.2) (#1527)
Connecting to a coding agent whose YAML config ends with a document-end marker (...) appended the new server table after it, so it became a second document. Reading the config back saw only the first, and setup failed and rolled back. A missing table now goes in before the document end, keeping comments and line endings. Tests cover LF and mixed CRLF, a comment on the end marker, repeated edits, removal, and a key that starts with ....
2026-11-10 23:57:33 +07:00
Afloat a41a0e154d Decode Unity shared-exponent RGB9e5 textures (R3.9) (#1515)
Unity RGB9e5Float textures (format 22) were reported as an unknown format and couldn't be exported. They're now decoded: three 9-bit mantissas share a 5-bit exponent, the linear RGB goes through the same display conversion as the other floating-point layouts, and alpha is opaque. Unity's row order, first-mip framing and output limits apply as before. Tests cover channel placement, exponent extremes, HDR clipping, short pixel data, oversized images and a serialized Texture2D.
2026-11-10 23:57:27 +07:00
RRFZ 83684828c0 Preserve JavaScript directive semantics when splitting sequences (R3.12) (#1523)
Unminifying split a comma sequence into separate statements, so in function f(){"hello","use strict";return this;} the two strings became a directive prologue, turned on strict mode and changed what this is. A sequence that starts with a string literal now stays together, and ordinary call sequences still split. Tests cover function and script bodies.
2026-11-10 23:44:52 +07:00
Afloat 96c4261c51 Avoid quadratic visited-node scans in filesystem walks (R3.12) (#1522)
The ROMFS, ext, SquashFS and JFFS2 walkers kept visited nodes in a list and searched all of it before each new node, so wide images spent quadratic time on cycle checks even within the entry limit. All four now use an ordered set, checking and inserting in one step. Traversal order, repeated-node and cycle detection, root handling, and the depth, byte and entry limits are unchanged. A 65,536-file ROMFS image read about 14 times faster in the author's measurement, and a new 4,096-file test checks order, bytes, limits and cycles.
2026-11-10 23:41:40 +07:00
RRFZ 17113afe9d Decode character references in HTML page titles (R3.13) (#1521)
HTML inspection returned a page title as written in the source, so <title>Fish &amp; Chips</title> read "Fish &amp; Chips". The title now goes through the existing character-reference decoder once before the 200-character limit. Unknown references stay as written, and the limit counts the decoded characters.
2026-11-10 23:38:20 +07:00
Alex Joaquim Pereira f975b6b369 Don't hand a build a capture made in the other mode (R2.9) (#1520)
A project's capture/ can be left by a study in the other mode, and the run only checked that the folder existed, so a Clean room build could be handed a Deep capture, and a Deep run could skip its inside study by using a Clean room one. craft.json now records the mode the current capture was studied in (capture_deep, format version 5; a version-4 capture migrates as Deep, like a saved session), and a run studies again when its capture isn't from its mode. A study clears the record before it starts, so one that fails partway leaves nothing a later run trusts, and a Clean room study removes the files only a Deep study writes (how-it-works.md, page.html, runs/). The extractor's fresh-study decision and the run queue use the same check.
2026-11-10 23:36:41 +07:00
Afloat 4d53f29b4d Verify issuer candidates before extending certificate chains (R3.12) (#1518)
The certificate chain walker took the first certificate whose name matched the issuer, even when its key didn't verify the child, so a same-name decoy could hide the real issuer. Equal subject and issuer names were also taken as proof of a self-signed certificate, which stopped a key-rollover certificate from reaching its signer, and a cycle of valid signatures could report fully linked without ever reaching a root. The walker now tries same-name candidates until one's key verifies the child, calls a certificate self-signed only when its own key verifies it, and reports fully linked only once verified links reach a verified self-signed top. The 16-link bound stays, the issuer search covers the first 64 certificates, and a note says when either limit applied. Tests use real RSA and P-256 signatures with wrong-key decoys.
2026-11-10 23:34:32 +07:00
Afloat 4d52aaca6a Use the declared named curve for ECDSA verification (R3.12) (#1517)
ECDSA verification picked P-256 or P-384 from the public key's point length and never read the curve the key declares, so a real P-256 signature verified even when the key said secp256k1, another curve or none at all. The verifier now reads the key's complete named-curve parameter and checks only a declared P-256 or P-384 key. Missing, malformed, duplicate or unsupported parameters are reported as not checked. Compressed and uncompressed points and the supported curve and digest pairs still work, as RFC 5480 describes.
2026-11-10 23:28:11 +07:00
Afloat 07717bf52f Decode Unreal DXT3 textures with explicit alpha (R3.9) (#1512)
Cooked Unreal textures in PF_DXT3 were recognised but couldn't be previewed or exported, because the shared pixel decoder had no DXT3 (BC2) layout. It now decodes 16-byte DXT3 blocks: each texel's explicit 4-bit alpha is widened to 8 bits, and the colour block always uses four-colour interpolation. Clipped edge blocks and the image size budget work as for the other block formats. Tests cover every alpha level, low-first endpoints, odd sizes, truncated blocks, output limits and a cooked Unreal package.
2026-11-10 23:26:33 +07:00
Afloat 9e2d625ce1 Reject conflicting certificate signature algorithm OIDs (R3.12) (#1514)
Certificate checks read the outer signatureAlgorithm but skipped the algorithm named inside the signed TBSCertificate. A certificate could declare SHA-1 inside, carry a valid SHA-256 signature outside, and still be reported as verified and fully linked. The verifier now reads the signed algorithm, in both the v1 and v3 field layouts, and refuses a certificate whose inner and outer algorithm OIDs differ or whose inner field is malformed, as RFC 5280 requires. RSA with NULL or absent parameters is accepted as before. Tests use real RSA signatures over the changed certificates.
2026-11-10 23:23:40 +07:00
Afloat f9a7e749e8 Bound shared Android string-pool copies by retained bytes (R3.12) (#1513)
Android string pools capped how many strings were read and how long each could be, but every offset was decoded into its own copy, so a 49 KB chunk pointing thousands of times at one long string kept 128 MiB in memory. Each pool now has a byte budget (64 MiB, or three times the chunk's declared size if larger). Decoding stops at the first string that doesn't fit and keeps what came before it. Binary XML and resource tables mark a capped global, type or key pool as partial and say how many strings were kept. Tests cover shared offsets in UTF-8 and UTF-16, bytes appended after the chunk, small pools and the warnings.
2026-11-10 23:09:37 +07:00
Afloat d7957953dc Avoid quadratic SQLite b-tree page walks (R3.12) (#1510)
SQLite row and count walks kept visited pages in a list and searched it for every new page, so wide databases spent quadratic time on the check. Both walks now use an ordered set, checking and inserting in one step, with the same traversal order, cycle and repeated-child handling, and page, depth and row budgets. Tests add a 1,023-row multi-level WITHOUT ROWID table and repeated-child and cycle cases.
2026-11-10 23:00:15 +07:00
Afloat 87aec133d5 Keep recovered Go functions before a damaged table record (R3.12) (#1509)
A Go function table whose later record couldn't be read returned nothing at all, so every complete function before it was lost; unreadable names and the warning limit could drop functions while the table still read as complete. A damaged record now stops the scan with a warning and keeps the functions before it (a wholly unreadable first record is still refused), and the table is marked truncated whenever fewer named functions than declared were recovered. Tests cover Go 1.2, 1.16 and 1.20 layouts, truncated and damaged later records, address overflow, unreadable names and the public ELF inspection.
2026-11-10 23:00:08 +07:00
Afloat b40c56ef5c Validate JVM switch tables before allocating decoded pairs (R3.12) (#1503)
The JVM tableswitch and lookupswitch decoders reserved room for their declared entries before checking those entries were there, so a truncated 12-byte table could ask for 16 MiB; and a lookup table took duplicate or descending keys, though its signed keys must strictly increase. The whole table must now be present before anything is reserved, a dense table's count is converted without narrowing, and a lookup table with keys out of order isn't decoded (the instructions before it are kept and the coverage is reported incomplete).
2026-11-10 22:56:23 +07:00
Afloat 38d7102df1 Preserve JAR manifest bytes when unfolding attributes (R3.12) (#1505)
A JAR manifest's lines were decoded as UTF-8 one physical line at a time, so a character split at the 72-byte fold became replacement characters; values lost their leading and trailing spaces, and only LF line ends were read. JAR integrity checks could then ask for a different entry name and miss the file meant. Continuation lines are now joined as bytes before decoding, only the space after the colon is dropped, CR, LF and CRLF all end a line, and a continuation after an empty line doesn't join two sections.
2026-11-10 22:43:35 +07:00
김준호 0d80de615e Name the lists a saved result can page in its summary and browse errors (R5.7) (#1500)
In a live run, an agent asked core_evidence_browse for a list by a name that wasn't one and had to run the tool again to find the right one, as neither the result's summary nor the error named its lists. A result's summary now carries its lists and their lengths, by the names core_evidence_browse reaches them with, in a detail: summary answer, the MCP server's summary-first answer and browse's own summary; and browse's errors for a name that isn't a list say which lists there are.
2026-11-10 22:36:17 +07:00
Afloat 770856d031 Validate CIL exception section framing (R3.12) (#1499)
A .NET method body's extra sections were read as an exception table whenever their kind was odd, and clauses were read before the section's whole declared size was checked, so unknown sections, cut-off sections and partial clauses could show up as real exception handlers. A section now needs its complete header and declared size, only the exception-table kind (flags masked off) is read as one, it must hold a whole number of clauses, and an unknown kind is reported and skipped while chained sections are still followed.
2026-11-10 22:27:14 +07:00
Afloat 5db53ddf9d Bound shared NIB object copies by retained bytes (R3.12) (#1498)
The NIB reader limited how many values objects copied but not how big they were, so objects sharing a large data value, a long key or a long class name could turn a 45 KB archive into over 130 MB in memory. Copied data, keys and class names now share one byte budget, 64 MiB or three times the input size, whichever is larger, checked before each copy; the reader says when the budget stopped it.
2026-11-10 22:20:07 +07:00
Afloat cd209873b0 Validate complete sBPF symbol records (R3.12) (#1496)
The Solana sBPF symbol reader took any entry stride and read fields before checking the whole record was there, so a crafted file could panic on its largest offset, a truncated record could become a symbol, and bytes from a section that isn't a string table, or a name with no end, could be reported as an entrypoint or syscall. A symbol table now needs a valid entry size and each complete record before its fields are read, a partial last record is reported, and names come only from string tables with a terminator inside their range.
2026-11-10 22:11:44 +07:00
Afloat b3518a82ab Reject overflowing NIB length and index encodings (R3.12) (#1497)
An Interface Builder NIB integer is up to ten groups of seven bits, and only one bit of the tenth group fits in 64 bits. The reader checked the shift but not the bits it dropped, so a tenth byte above 1 turned an out-of-range value into an unrelated small length or table index. Such an integer is now refused, and the whole unsigned range still reads.
2026-11-10 22:08:40 +07:00
김준호 4d270ab83f Record a live chat paging a big comparison result (R5.7) (#1493)
Docs only. A live chat --deep run with Claude Code on a 581 KB comparison of two builds showed it asking for a summary, then paging the result with core_evidence_browse and quoting the rows, with no result over the 80 KB budget, and a page just under the budget reaching it whole. The roadmap line is ticked with what the run showed, and two new lines record the gaps it found: name the lists core_evidence_browse can page, and compare Rust names without their crate hash.
2026-11-10 22:01:46 +07:00
Martinus 11d0042272 Recognise text files in target lists and triage (R3.11) (#1490)
A text file (notes, source code, settings) was a target of unknown kind, so the target list and triage called it a file we don't recognise yet. Text now has its own target kind, found by the same check the text reader uses (a byte-order mark, or valid UTF-8 with no zero bytes and few control characters near the start) after every other format, so lists and triage call it a text file and point to core_text_read. A binary file stays unknown.
2026-11-10 22:01:38 +07:00
Alex Joaquim Pereira ca6f2f9695 Don't let a key save outlive the backend it belongs to (R5.5) (#1495)
A key save still in flight could write the key back after the backend's removal had deleted its key and configuration, leaving an orphan key that a backend re-added under the same name would silently use. Saving or forgetting a key and removing a backend now take turns, so a save that comes after a remove fails, and Settings keeps a backend's remove button disabled while its key is being saved or forgotten.
2026-11-10 21:40:47 +07:00
Afloat d1599159a2 Check quantized GGUF tensor byte ranges (R3.12) (#1491)
A GGUF model's quantized tensors (Q4, Q5, Q8, K and IQ types) had no byte length in the model-header report, so a complete tensor table could describe a truncated payload without that tensor being counted as past the end of the file. Their storage length is now calculated from each type's block layout, scale bytes included; a row width that isn't a whole number of blocks is reported, an unsupported type keeps an unknown length, and the end-of-file checks can't overflow.
2026-11-10 21:10:20 +07:00
Alex Joaquim Pereira 16f05f6f2b Scroll the AI settings page in the add-by-address smoke test (#1492)
The key row #1486 added for every API backend pushed the add-by-address form's Add button below the AI settings page's visible area, so the test's click could land outside it and the test failed now and then. It now scrolls the page first, as a person would.
2026-11-10 21:09:22 +07:00
Alex Joaquim Pereira 6db3a29665 Replace a saved API key from Settings and the CLI (R5.5) (#1486)
A key saved in the app silently wins over the one in the environment, so a rotated key stayed hidden behind the old one unless the backend was removed or the keychain edited by hand. Settings → AI now shows for every API backend whether a key is saved; a saved one can be forgotten, so the environment's is used again, and a new one saved in its place, without removing the backend. The CLI does the same with ai key <name> (--key-env, --key-stdin or --forget), and never prints the key. A new key is read back after saving, and a forget that a locked or failing keychain can't confirm says so instead of reporting success.

Refs #1358
2026-11-10 20:09:44 +07:00
Oliver Mee c066169783 Keep mechanics behavior unverified without runtime measurements (R2.5) (#362)
A comment containing 4.5 could satisfy the mechanics check and claim that walk speed uses it, while an equivalent calculation without that literal could fail. The numeric-text match is gone: a readable mechanics sheet passes its readability check with a saved unknown for the unmeasured behavior and makes no claim about what the build uses. A check result another builder turn can't resolve no longer sends the builder to retry it; the builder states it as unverified instead, and the summary counts the comparisons that remain unverified.
2026-11-10 19:56:09 +07:00
FredApps 9a3eee4b95 Read the process list on FreeBSD: one ps -o per column (#1487)
POSIX makes everything after = in a ps -o argument the header, so FreeBSD's ps read pid=,ppid= as a single pid column headed ",ppid=". The process tree then had no parents, a runner's child window was never found there, and snapshot_finds_an_owned_child_on_this_host failed on every FreeBSD run since it was added.
2026-11-10 13:55:50 +01:00
김준호 a39424a977 Check reading a text source in a live agent chat (R3.11) (#1489)
Docs only. The roadmap line for live-checking core_text_read in an agent chat is ticked with what live Codex and Claude Code chats showed, STATUS says what was run, and a new line records the gap they found: a text file's kind is still unknown, so the target list and triage call it a file we don't recognise yet.
2026-11-10 19:52:56 +07:00
muraa-p 909274a044 Read a PyInstaller PYZ archive given on its own (R3.11) (#1488)
A PyInstaller PYZ archive could only be read through the program around it, so a PYZ-00.pyz on its own showed nothing. It's now read on its own: each module by its dotted name, namespace packages kept as a fact, the Python version its magic names, encrypted (--key) modules listed but not readable, and a module read back as a .pyc with its header. A .pyz that's a Python zip application is still read as a ZIP.
2026-11-10 19:49:48 +07:00
김준호 c95d361218 Read a text source as text outside a build (R3.11) (#1480)
A text file outside a build (a script, Markdown, settings, a log) could only be searched byte by byte: the native tools refused it and build_file_read works only in a build. The new core_text_read (Deep mode) reads one as text, a page of lines at a time: UTF-8, or UTF-16 with a byte-order mark, invalid bytes shown as U+FFFD and counted, very long lines cut and named, and a file with zero bytes near its start refused as binary. Nothing is run.

Fixes #539
2026-11-10 18:13:09 +07:00
muraa-p c3e8c5185d Hash a signed Windows program the way Windows does (R3.11) (#1485)
native_publisher_show reported a signed program as changed after signing when its sections had a gap between them, because the file was hashed as one run of bytes up to the certificate table. The Authenticode hash now follows the PE/COFF specification: the headers (less the checksum and the security directory entry), then each section in the order its data sits in the file, then the data after them less the certificate table, so a gap between sections isn't hashed.
2026-11-10 18:09:04 +07:00
FuryNocturnTV (Tare Fernandez) 62187d5663 Say in Settings when a saved agent program is gone (R2.2) (#1468)
When a coding agent's saved program had gone (an update moved it), another program ran in its place with nothing in Settings saying so. Settings → AI now says under the agent's program that it isn't there any more and which program runs in its place, read on the worker that loads the AI list, and offers "Use it" to save that program when it's a path of its own.

Refs #721
2026-11-10 17:45:03 +07:00
Tanish Manku 4a9a19c2ef Let strings awaiting translation pass the coverage check (R5.2) (#1477) 2026-11-10 03:43:29 -07:00
FredApps b815d8c466 sonar: leave out vendor/ and record why SHA-1 stays in the WebSocket handshake and signature checks 2026-11-10 11:22:59 +01:00
Justin John 0c1f7f7d8f Space an API backend's requests out with requests_per_minute (R5.4) (#1469)
A service that limits requests a second or a minute could only be answered after the fact, by waiting and retrying once it had said it was rate limited. An API backend can now be given requests_per_minute in config.toml, and its requests start at least that far apart, across every conversation on that backend in the app (a crew's workers, a build and a chat). A stop ends the wait; unset or zero sends requests as they come, as before.

Refs #668
2026-11-10 14:02:04 +07:00
Justin John 300dba586b Find a Unity Editor added to Unity Hub with Locate (R1.6) (#1467)
Unity Editors were looked for only in Unity Hub's default folders and its install-location setting, so an editor added to the Hub with Locate, which can be anywhere, wasn't found and Make kept saying Unity isn't installed. Unity Hub's own list of editors (editors-v2.json, then editors.json) is now read too, in either of its layouts, and every editor on it whose program is still there is offered; the list is read up to 1 MiB, and one that can't be read finds nothing.

Refs #1077
2026-11-10 13:33:57 +07:00
muraa-p b328b7e96e Wait for the cut the log-cap test is about (#1466)
The test that a launched program's log is cut while it writes assumed the cut would come within the few seconds its stand-in spent printing, so on a loaded machine the file could end over its bound with nothing wrong. The stand-in now watches its own log and keeps printing until it has seen a cut and filled the file again, and the test checks it saw a cut before checking the size. No change outside the test.
2026-11-10 13:21:55 +07:00
muraa-p 06566e2909 Cap a run's log while the app is open (R2.10) (#218)
A program started from Play or a pin wrote last-run.log or play.log for as long as it printed, with no limit. The program still writes straight to its file, now opened for appending, and while Craft Anything runs the file is cut back to empty once it passes 1 MiB (looked at every 2 seconds), so the program's writes never fail or block and the log's last lines are still there to read. A program that outlives the app is left as it was.
2026-11-10 12:49:03 +07:00
FuryNocturnTV (Tare Fernandez) 08d6a973cd Build CheckStop::limited only for the Unix tests that use it (#1461)
CheckStop::limited is only used by Unix tests, so on Windows it was dead code and clippy --all-targets -D warnings failed on main there. It's now built only for those tests.
2026-11-10 12:21:33 +07:00
FuryNocturnTV (Tare Fernandez) d8d0abb8ab Let a person stop adding a server while it's asked for its models (R5.4) (#1460)
Adding a server by its address can wait up to a minute for one that was reached but is still starting or loading a model, and that wait could only run out. The form now has a way to stop it: the request runs on a helper thread and the wait checks for a stop every 100 ms, so it ends at once, nothing is added, and the app says it stopped adding the server instead of giving address advice.
2026-11-10 12:17:41 +07:00
Cr 6d1084a522 Print Swift subscript accessors the way swift-demangle does (R3.12) (#1458)
A Swift subscript accessor was printed with its type first and the accessor last (Swift.Array.subscript(Swift.Int) -> A.getter), so the accessor read as if it belonged to the result type. It now reads as swift-demangle prints it, the accessor right after subscript and the type after a colon (Swift.Array.subscript.getter : (Swift.Int) -> A), in every symbol that names one; a subscript without an accessor still prints its type straight after.
2026-11-10 12:12:32 +07:00
Cr b3b7428eba Decode Swift value witness symbols (R3.12) (#1457)
A Swift symbol ending w and two letters is a value witness, one of the functions the runtime calls to copy, move or destroy a value of a type, or to read and set an enum value's case. These now decode as swift-demangle prints them, for example "destroy value witness for" and the type; an unknown kind, or one whose operand isn't a type, isn't decoded.
2026-11-10 12:07:31 +07:00
Cr f83c357bd5 Decode Swift private declarations (R3.12) (#1456)
A private or fileprivate Swift declaration's symbol carries the name, then an identifier for the file that declares it, then LL, as two declarations in different files may share a name. Such symbols weren't decoded; the name now reads (name in _HASH), as swift-demangle prints it, wherever it appears: a type, a protocol, a function, a variable, a nested type or a generic argument.
2026-11-10 12:07:25 +07:00
Justin John 8d7df57008 Log it when a stopped program's exit can't be checked (R5.3) (#1455)
After stopping a program, the wait for it to be gone stopped silently when checking its exit failed. It now logs a warning with the error; a program that ended, one still running, and one past the 5-second grace behave as before.
2026-11-10 12:00:12 +07:00