Commit Graph
1148 Commits
Author SHA1 Message Date
GAlun fb3428280b Reject required WASM font builds when filtering leaves no fonts (R2.9) (#1755) (#1755)
With CRAFT_FONTS_REQUIRED set, a browser build whose craft-fonts manifest lists fonts but none the web allowlist keeps now fails with that reason, instead of building with an empty font table. Optional builds, native builds and an empty manifest's own error are unchanged.
2026-11-12 16:18:22 +07:00
Justin John 0a5ab0dba7 Stop a launched program without an unlimited wait under its lock (R5.3) (#1756) (#1756)
Play's Stop (and stopping a project's running app) sent the kill and then waited for the program with no limit while holding the launch's lock, which the watcher and every is-it-running check also take. It now sends the kill under the lock and waits outside it for at most five seconds, logging a program that is still there and returning false, as for other runs since #1438.
2026-11-12 15:57:32 +07:00
Nathaniel Caldwell f513e2d329 Read the context window from the server (R5.4) (#1754) (#1754)
Before a backend's first request (and once more while the server hasn't said), the agent asks its server for the context window it has loaded: the model list's context fields for OpenAI-compatible services and OpenRouter, and on this computer or its network llama.cpp's props, llama-swap's upstream (only for a model already loaded), LM Studio's loaded length and Ollama's /api/ps. A local model's budget becomes three quarters of that window instead of a fixed 24k; for a paid service a window read this way only lowers the 150k default. A refusal's window and a budget the person set still win.
2026-11-12 15:40:55 +07:00
d7do7e 7049097d35 Fall back to app/ for relative build tool paths (R5.4) (#1752) (#1752)
Commands run by build_command_run work inside app/, so compiler errors name files relative to it. build_files_list, build_file_read and build_file_edit now find such a path inside app/ when nothing is at it in the project root, and build_file_write writes there when the folder already exists in app/ and not in the root; anything else resolves as before, still inside the project.
2026-11-12 15:26:06 +07:00
YAO Changsong bd72993604 Keep the extension on AArch64 memory index operands (R3.11) (#1745) (#1745)
A register-offset AArch64 memory operand such as ldr w0, [x1, w2, sxtw #2] now keeps its index at its written width with its extension or shift, so pseudo-C shows the sign-extended index ((int64_t)(int32_t)w2 << 2) instead of a plain unsigned x2 * 4. An unchanged index stays plain, and x86 scaled indices render as before.
2026-11-12 14:54:11 +07:00
Justin John b9de86c149 Bound Ghidra's jump tables that have no bounds check before decompiling (R1.5) (#1743) (#1743)
A jump through a byte-indexed table of offsets with no bounds check, as Rust's async state machines use, made Ghidra read 256 entries, follow the ones inside other code and decompile without end (#1715). Before decompiling, the bridge now finds such tables, works out where each ends from a linear pass over the function (its .pdata extent on Windows) and gives Ghidra their real targets as a switch override, in memory for this run; guarded tables only get their targets added. A 60-stage Rust async program decompiled in 16 s instead of falling back after 938 s. Fixes #1715.
2026-11-12 14:12:52 +07:00
RRFZ d67583b183 Recognize HTTP extension methods in packet captures (R3.12) (#1741) (#1741)
A captured request using a WebDAV or other extension method (PROPFIND, MKCOL, REPORT…) now reads as HTTP with its method, target and Host, instead of only the nine common methods: any valid HTTP method token counts, case kept, with the same start-line and version checks as before.
2026-11-12 13:33:56 +07:00
RRFZ ff7311ae94 Separate SQLite column names at SQL line breaks (R3.12) (#1740) (#1740)
A CREATE TABLE whose column names are followed by a carriage return or form feed now reads them apart from their types, as SQLite does, so an INTEGER PRIMARY KEY written that way is still the rowid alias and its rows show the stored rowid instead of NULL. Quoted names keep those characters.
2026-11-12 13:32:43 +07:00
RRFZ a61879758a Stop TAR listings at invalid local PAX sizes (R3.12) (#1739) (#1739)
A member's own PAX header with a size that isn't plain decimal digits (a word, a sign, spaces, an overflow) now stops the listing before that member with a warning, as an invalid global size already did, instead of quietly falling back to the ordinary header and reporting a complete archive. Earlier members stay readable.
2026-11-12 13:26:30 +07:00
RRFZ befb291a1f Keep quoted delimiters inside XML plist tags (R3.12) (#1738) (#1738)
An XML plist tag with an attribute such as note="a>b" no longer ends at the quoted >: quotes are tracked while finding the tag's end, so valid documents parse, and an attribute whose quote never closes is refused instead of turning later markup into a value.
2026-11-12 13:18:12 +07:00
Fury a01669bc23 Bound folder walks by the entries examined, not only the files kept (R3.11) (#1737) (#1737)
A folder walk is now limited by the entries it examines and the path bytes it holds, not only the files it keeps, so a tree of empty folders or links or one folder with millions of names no longer walks or loads without end. A cut listing keeps the first names in name order, the same every time; the walk stops at the first file or entry over a limit and says so, cancel is checked inside a long folder listing, and an ASAR's unpacked folder and JavaScript source folders now report when they were cut short.
2026-11-12 13:03:51 +07:00
Fury 2c97ec7e8a Fail a build that requires craft-fonts when CRAFT_FONTS_DIR is missing (R2.9) (#1736) (#1736)
CRAFT_FONTS_REQUIRED without CRAFT_FONTS_DIR is now a build error naming both, instead of a build with no fallback fonts where non-Latin scripts show as boxes. A manifest listing no fonts counts as a bad folder, and CRAFT_FONTS_REQUIRED set to nothing or 0 means not required. The decision is one tested function in build.rs.
2026-11-12 13:03:41 +07:00
Fury 699464db8d Never save defaults over a config.toml that couldn't be read (R2.9) (#1735) (#1735)
Only a missing config.toml gives plain defaults now. A file another program holds, the account can't read, or that isn't UTF-8 no longer loads as defaults that the next save writes over it: one that can't be understood is set aside under the first free config.toml.broken name (an earlier copy is never replaced), and one that can't be read or set aside stays where it is while saves, deferred saves, settings_set and plugins_add refuse with BadSettings.
2026-11-12 12:57:24 +07:00
RRFZ 52e6817bf0 Stop CArchive listings at unterminated member names (R3.12) (#1733) (#1733)
A packed Python executable's table entry whose name has no terminating NUL is now read as damage: the listing stops there, keeps the members before it and says why, instead of taking the record's padding as a file name.
2026-11-12 12:29:49 +07:00
RRFZ 726fa4d25b Keep ordinary EVM metadata arrays typed (R3.12) (#1732) (#1732)
A contract's CBOR metadata no longer turns every array of three integers into a dotted version string: only the solc and vyper fields read as compiler versions, so an entry such as sizes: [1, 2, 3] stays an array.
2026-11-12 12:23:25 +07:00
RRFZ 744e5c9838 Read source map annotations with optional marker spacing (R3.12) (#1731) (#1731)
A script's trailing sourceMappingURL annotation is found with no space, a tab or several spaces after the //#, //@ or /*# marker, as the source map standard allows; an annotation whose URL contains whitespace is ignored.
2026-11-12 12:13:49 +07:00
RRFZ 5756393c83 Keep CRLF when adding the first JSONC object (R3.12) (#1730) (#1730)
Creating the first object in a whitespace-only or comment-only CRLF settings file now uses the file's line endings, as adding to an existing object already did. Comments and a BOM stay in place; a new empty file still uses LF.
2026-11-12 12:08:33 +07:00
htjulia 0453ec4a9b Keep the shift on AArch64 shifted and extended register operands (R3.11) (#1729)
Shifted-register operands lost their shift and extended registers their extension, so add w9, w10, w9, lsr #31 read as w9 = w10 + w9; and sub w9, w9, w9, lsl #3 as w9 -= w9; (#1725). Operands now carry a shift or extension (LSL, LSR, ASR, ROR and the eight extensions), dropped only when it changes nothing, and pseudo-C spells out what C needs, such as ((uint32_t)w9 >> 31) and sign or zero extension before a shift.
2026-11-12 12:07:02 +07:00
htjulia b2c221971a Keep the value of AArch64 MOVK and MOVN immediates (R3.11) (#1728)
MOVK replaces 16 bits and keeps the rest, but lifted as a whole move (mov w9, #0x2493; movk w9, #0x9249, lsl #16 read as w9 = 0x92490000;), and MOVN's value is the inverted immediate but lifted as the immediate (mov w0, #-1 read as w0 = 0;) (#1724). MOVK now decodes as an insert carrying the shifted immediate and the mask of the bits kept, printed as w9 = (w9 & 0xffff) | 0x92490000;, and MOVN carries the inverted value, shown for a W register as the signed value the assembler shows.
2026-11-12 12:06:44 +07:00
htjulia 96bf9c2017 Move the source, not the zero register, in AArch64 move aliases (R3.11) (#1727)
mov xd, xm and mov wd, #bitmask are ORR from the zero register, and the lifter took the zero register as the value moved, so mov x19, x0 read as x19 = xzr; and a loop then read from address 0 (#1723). The A64 decoder now recognises the ORR form of mov from its operands, with or without formatted text, and keeps only the destination and the moved value; pseudo-C prints x19 = x0; and constant tracking follows a known value through the move. A shifted source or a real first source is still an ORR.
2026-11-12 12:06:26 +07:00
RRFZ e0c70c2926 Normalize XML plist line endings before decoding text (R3.12) (#1726)
XML plists saved with Windows line endings kept carriage returns inside string values and dictionary keys, so a key written across lines couldn't be found under the name a conforming XML reader returns. Literal CRLF and CR now become LF before tokenizing, as XML 1.0 requires, in UTF-8 and both UTF-16 byte orders; a &#13; character reference still gives a carriage return.
2026-11-12 12:02:39 +07:00
Justin John 573d84e751 Say in the feed while a decompile waits on Ghidra, and for how long (R1.5) (#1722)
While native_function_pseudocode waited on Ghidra the feed showed only "start native function pseudocode" for up to 15 minutes, because the tool runs in our MCP server inside the coding agent and its progress reaches only the agent (#1714). A decompile now says, once a minute, how long it has waited (or that it is queued behind another decompile), as the tool's progress and as a line in the project's inbox; the run shows each new line in the feed, the line goes when the wait ends, and a run starts by clearing lines a stopped tool left.
2026-11-12 11:50:40 +07:00
Hasnain 88d67cebf4 Refuse Clean room for native Aider runs (R2.2) (#1110)
Aider's adapter refuses a Clean room run in validate_access, but only the ACP path called it, so rebuild --clean-room with the Aider backend still started Aider and its unchecked reads. run_cli now checks the run's access mode before the setup check, so an agent that can't hold a Clean room run is refused on the native path too, before its program starts. Only Aider and Grok (ACP-only) override the check, so no other agent changes.
2026-11-12 11:00:59 +07:00
Nicolas Bohn 12aad97757 Keep the sources of a source map refused for bad mappings or section offsets (R3.12) (#1717)
A map with malformed mappings or section offsets was reported unreadable, although its sources list is usually whole, and the list is all an application graph keeps. A new sourcemap::parse_sources reads the sources, content, names and ignore list without decoding mappings or checking section offsets; the application graph re-reads a map parse refuses for those reasons this way, lists its sources with a source_map_mappings_unreadable limitation, and compares them as usual. A map whose decodable mappings name a source past the end of its list, or with a malformed section, is still unreadable.
2026-11-12 09:26:47 +07:00
Nicolas Bohn 438c80082a Report sources of unreadable source maps as uncertain, not missing (R3.12) (#1708)
A source map that was malformed, had an undecodable data URL or was listed but not loaded left its sources looking absent, so a source comparison reported them as confirmed missing. Such a map is now marked unreadable with a limitation, and the comparison reports otherwise unmatched sources as uncertain with partial coverage. A stand-alone .map beside an analysed script is read like a referenced one; other .map files stay listed and unread, so they can't make a comparison uncertain or match code that doesn't ship.
2026-11-12 08:50:04 +07:00
Nicolas Bohn ab79ec87a4 Count source-map sections, check skipped values and keep refused maps' sources uncertain (R3.12) (#1705)
Follow-up to #1703. A sections array of non-objects could cost several times the old parser's memory, skipped values weren't checked as a full read checks them so some broken maps read as valid, entries a repeated key replaces still used the budget, and the analyzer read a map refused at a limit as one with no sources. Index-map sections now count against the entry budget and non-map sections stay small, skipped values get the same string, number and nesting checks, a replaced list is freed and gives its entries back, the default limit is 4,000,000 so a million sources with content fit, and a map refused at any of the parser's limits leaves its sources uncertain with a limitation, while a malformed map is read as before.
2026-11-12 02:43:59 +07:00
Nicolas Bohn a33c2c357f Drop a cut-off roadmap line and a pending line that is already done (#1704)
#1001 brought back the old open copy of the packaged Deep-build checklist line next to the ticked one and cut the ticked one off after "from the"; the cut-off line is removed and the full line ticked again, since docs/releasing.md has the check. The open line about the macOS remote-query test is removed too: its fix (#949) is already ticked.
2026-11-12 02:22:36 +07:00
Nicolas Bohn ba83da2bc5 Refuse source maps with more entries than the parser keeps (R3.12) (#1703)
The source-map parser read the whole JSON into a value and then copied every sources, sourcesContent and names entry, so a 64 MiB map of empty strings built about 21 million strings twice before anything was checked. It now reads only the fields it uses, straight from the JSON, and counts every sources, sourcesContent, names and ignore-list entry against one limit (2,000,000 by default) shared across sections; a map with more is refused with TooManyEntries as soon as the limit is passed, without reading the rest.
2026-11-12 02:17:19 +07:00
Alex Joaquim Pereira cbf7c17981 Resolve relative project paths before builds, option runs and Play (R2.7) (#1702)
A project placed by a relative path gave engines and programs relative paths, but the child already runs inside app/, so Unity's -projectPath, Godot's --path, Unreal's -project and -archivedirectory, option runs (--screenshot, --self-test), console run checks and Play pointed inside app/ a second time. They now resolve the project path first; a program named by a bare PATH command is left as it is.
2026-11-12 00:49:27 +07:00
Alex Joaquim Pereira 3ce1ce9f52 Bound source-map recovery manifest paths and report partial recovery (R3.12) (#1700)
The source-map parser bounds the inventory it builds, but source recovery's manifest repeated every expanded source path in its outputs, so a long shared sourceRoot could still retain tens of megabytes of paths. Recovery now charges each original's source path and output path to the inventory's entry and byte budget, shared across inputs; once it's reached, further originals are left out, and the manifest, result, summary, a limitation and partial coverage say so. A pitfalls entry records the rule.
2026-11-11 23:34:20 +07:00
Agapenor 86d047cbc5 Stop with a plain error when the OpenCode found is 1.x (R2.2) (#1151)
Craft Anything runs OpenCode 2 (opencode run --standalone). OpenCode 1.x has no --standalone, so the flag check saw it was missing, said "trying it anyway", and the build sat on OpenCode's usage text (#1111, #1693). When OpenCode's help was read and lacks the flags, the turn now stops at once saying the opencode found looks like 1.x, with how to install OpenCode 2 or choose it in Settings -> AI. A help that couldn't be read still lets the run go on, and a refused program is checked again next turn, so an updated OpenCode is seen. Other agents keep "trying it anyway".
2026-11-11 23:29:13 +07:00
NicolasBohn 0634265620 Stop malformed code-signature requirement OIDs showing as a different OID (R3.12) (#1698)
oid_text, which names certificate fields and policies in decoded code requirements, showed malformed OID content as a different, valid-looking OID: an unterminated last subidentifier was dropped, a subidentifier padded with a leading 0x80 octet was accepted, empty content was an empty string, and more than 64 arcs were cut short. These now read "invalid", and a first subidentifier longer than eight octets is split into its two arcs like a short one.
2026-11-11 23:20:15 +07:00
muraa-p 041a9bed1f Drop pending roadmap lines that a ticked line already covers (#1697)
Four open lines in the roadmap repeated a nearby line that is already ticked (the folder a build command ran in, what usage.json left out of a local build, a flaky helper test, and OpenCode's MCP server over SSH), so cargo xtask pending listed work the code already does. They are removed; each outcome stays in its ticked line.
2026-11-11 23:07:12 +07:00
muraa-p adeddc9149 State what each coding agent's builder gets, in one typed table (R2.2) (#1691)
What a builder gets from each coding agent (our tool server, our approval policy, resume, notes during a turn, a message longer than the command line) was spread over each adapter's arguments, environment and ACP session. cli_agents::grants now states it per adapter, takes resume and long messages from the adapter itself, and tests hold every row to what the adapter actually hands a builder; an adapter without a row fails them, and unchecked cells say NotYet with the gap in words.
2026-11-11 22:29:29 +07:00
Afloat 3a9ad9c6c5 Report uncertain source comparisons after source-map truncation (R3.12) (#1694)
When a source map's inventory was cut by its limits, the source-to-bundle comparison searched only the retained names and reported an omitted source as confirmed unmatched. Sources with no observed match now go in a separate uncertain_sources list with the reason source_map_inventory_truncated, the result says the inventory was truncated, and the evidence carries a limitation and partial coverage; positive matches are unchanged.
2026-11-11 22:17:23 +07:00
Afloat 35f1136502 Keep colliding source-map originals during recovery (R3.12) (#1690)
Distinct source identities such as src//main.js and src/main.js normalize to the same recovery path, so recovery kept the first and dropped the rest; a file and a folder of the same name, and separate inputs with the same name, lost sources the same way. Ordinary paths are unchanged; a source whose path would collide now goes to its own sources-collisions/<input>/<source>/ folder, and the manifest records each one's input and source-map index. A pitfalls entry records the rule.
2026-11-11 21:53:57 +07:00
Afloat 22c44d01d2 Bound expanded source-map source lists before building them (R3.12) (#1689)
A small source map could expand to gigabytes when its sourceRoot was copied into every source name, and the full list was built before the application analyzer kept 5,000 of them. Source lists are now built within an entry and byte budget shared across sections and an application's maps, checking each expanded path's length before allocating it; when only a prefix fits, the result says it was truncated and the analysis notes it as a limitation. A pitfalls entry records the rule.
2026-11-11 21:34:19 +07:00
muraa-p 1f2ab65a81 Compare a console output that is only numbers (R2.5) (#1686)
Word likeness ignores one-character words, so an output made only of numbers had no words on either side and bare 4.5 against 9.0 passed as identical. When both outputs are only numbers and there is no second observation of the original, the check now compares the numbers in order and says which differ; output with words beside its numbers is compared as before.
2026-11-11 20:43:15 +07:00
Alex Joaquim Pereira 87408500d0 Keep a failed program's last output in its error (R2.9) (#1685)
When a program printed more than its output cap, its error said "what it printed last" from the first bytes kept and never said the rest was dropped. The process runner now also keeps the last 16 KiB of a stream once it passes its cap; failure messages, ssh diagnosis and build checks quote that end and say the output was cut, while tools that parse output still get its start.
2026-11-11 20:32:53 +07:00
Alex Joaquim Pereira 80479a9b9e Use an attached project's saved builder and keep its feed and request (R2.9) (#1684)
After #1682, a run on a reattached project still used the builder picked on Make instead of the project's own, replaced the live conversation of a project already building, and cleared the Make draft even when the run didn't start. It now uses the saved builder (asking for one if it's gone), shows the running build's conversation and says it's already building, and clears the draft only once the request is running or queued. The run remains the only writer of the project's feed.
2026-11-11 20:11:12 +07:00
Alex Joaquim Pereira 2cee4610f0 Keep a reattached project's saved settings, conversation and follow-up request (R2.9) (#1682)
Since #987, picking a folder that already holds a project attaches to it, but the create path then overwrote its saved builder, asset budget, generated-assets choice and stack, replaced its conversation, and dropped the typed request. An attached project now keeps everything the person set and its saved conversation, and the request is added as its follow-up, in the app and the CLI; the CLI refuses --build-with, --generate-assets and --existing for such a folder with a fix to use instead.
2026-11-11 19:19:15 +07:00
Afloat 007aeebb02 Compare stable numbers in console run checks (R2.5) (#1679)
The console run check compared words after dropping one-character tokens, so bare results like 4.5 and 9.0 looked empty and 12 matched -12. Study now runs the original twice per input; the check requires the numbers that were the same in both runs to match in order (keeping signs, decimals, exponents, radix and large integers), ignores numbers that varied between them, such as timings and PIDs, and says so in its note. Without a second observation it compares words only. Program names are replaced only as whole words, so they can't eat into numbers.
2026-11-11 19:16:30 +07:00
muraa-p 93a5057ff9 Record the Windows run of the watched-launch descendant tests (R5.2) (#1683)
The roadmap asked for #1030's parent/descendant and startup-timeout cleanup tests to be run on Windows. They passed five runs in a row on Windows 11, and no processes they started were left running afterwards; the line is ticked with what was checked.
2026-11-11 19:15:43 +07:00
Afloat 500a09a217 Apply source map root prefixes before interpreting source paths (R3.12) (#1680)
Source lookups and recovered source lists dropped sourceRoot when a source started with / or contained ://, giving the wrong original source. A non-empty root is now prefixed to every source before it is read as a URL, as ECMA-426 describes; an empty root still means no root, since generators commonly write "" for that.
2026-11-11 19:04:22 +07:00
Afloat b12816c2b3 Recover classic ext triple-indirect file blocks (R3.12) (#1666)
Files reaching the third level of classic block pointers (above about 64 MiB with 1 KiB blocks) were left unrecovered. The reader now follows the triple-indirect pointer, keeps the full logical span of sparse subtrees at every level, and still refuses files whose mapping blocks are unavailable.
2026-11-11 18:56:44 +07:00
Afloat 842a76a41a Tell nonfinite CIL constants apart in method fingerprints (R3.12) (#1673)
Method fingerprints wrote float constants as JSON numbers, which can't hold NaN or infinity, so methods differing only in such constants got the same fingerprint. Nonfinite constants are now written as their IEEE-754 bits, and single-precision NaNs keep their original operand bits, which widening to double could change.
2026-11-11 18:56:37 +07:00
Afloat aad1a6d62b Return the first XZ stream from SquashFS blocks (R3.12) (#1669)
SquashFS reads one XZ stream per block, but the block decoder refused a complete first stream whenever bytes followed its footer, so the file's data was lost. It now checks the stream the decoder consumed as a complete XZ stream on its own and returns it, ignoring what follows, and still never returns output from a stream that failed to decode.
2026-11-11 18:50:53 +07:00
Afloat 67ba23122d Keep sBPF symbol and relocation limits global across ELF tables (R3.12) (#1678)
The sBPF inspector capped symbols and relocations at 400,000 records, but reaching the cap only ended the current table, so each further SYMTAB/DYNSYM or REL/RELA table could add another record past it. It now stops visiting further tables of that kind once the cap is reached, keeping the earlier records and their order.
2026-11-11 18:50:45 +07:00
Afloat bf342840fb Report unavailable cramfs block-pointer tables as incomplete (R3.12) (#1681)
A cramfs file whose block-pointer table lay outside the available filesystem bytes was left without contents, but nothing said so, and the image still counted as completely recovered. Such a file now gives a warning and marks the image incomplete, keeping the file listed.
2026-11-11 18:48:37 +07:00
Afloat 037ca0d047 Recover JFFS2 files from big-endian images (R3.12) (#1665)
Big-endian JFFS2 images were detected and then refused. The reader now takes the byte order from the first node's magic, after any erased space, and reads node, inode and directory integers in it, so the same tree and contents come out in either order; a node in the other byte order stops the scan with a warning.
2026-11-11 18:35:44 +07:00