Repository navigation
Description
Observed behavior
On clean main fe677f6cf9853fb12490dfb8ef23ccae3a551049, a task accepted and exported by REA fails on the identical final XML file because Python str.strip() and JavaScript String.trim() classify two characters differently.
Text after <entry/> inside <prefs> |
REA keeps this text node | Exported reader keeps it | REA final check | Exported final check |
|---|---|---|---|---|
| U+0085 (NEL) | yes | no | true | false |
| U+FEFF | no | yes | true | false |
ordinary after control |
yes | yes | true | true |
U+FEFF here is inside the element, not a UTF-8 file-header BOM. No namespace, CDATA, entity declaration, archive, SQLite key or timestamp is involved.
Public reproduction actually run
For each case, retain a before/after file at .config/notes/settings.xml in an authored valid desktop capture fixture. The before file is <prefs><entry/>before</prefs>; after replaces before with the character or control text above.
inspect-desktop-application-state capture --jsonreads the XML text correctly.describe-desktop-application-task capture --jsondrafts the U+0085 check as:
The actual check is value_equals at /root/children/1; its expected string has one code point, 0x85.
For U+FEFF it drafts value_absent at the same pointer.
3. export-desktop-application capture bundle --task task.json --json succeeds for all three cases.
4. Run the unmodified generated data-reader/evaluator functions from that output against the original before/final files. All before checks fail as intended. REA passes every final check; the exported verifier fails both character cases and passes the ordinary control.
Six fresh public state/draft calls plus three exports were run. Native ElementTree independently retains the original characters as the <entry/> tail. All retained capture/file hashes remain unchanged. The generated helper/evaluator bytes were checked verbatim in the actual exported files; no service transport or business-code mocks were used.
Minimal reader comparison after npm ci && npm run build:cached:
import {spawnSync} from 'node:child_process';
import {xmlView} from './dist/domain/desktop/stateFormats.js';
import {PYTHON_IMPORTS,PYTHON_HELPERS} from './dist/domain/desktop/appExportPython.js';
const texts=[String.fromCodePoint(0x85),String.fromCodePoint(0xfeff),'after'].map(x=>'<prefs><entry/>'+x+'</prefs>');
console.log(texts.map(xmlView));
const imports=PYTHON_IMPORTS.split('\n').filter(x=>!x.includes('agentenv_protocol')).join('\n');
console.log(spawnSync('python3',['-I','-B','-c',imports+PYTHON_HELPERS+'\nprint(json.dumps([_xml_view(x) for x in json.load(sys.stdin)]))'],{input:JSON.stringify(texts),encoding:'utf8'}).stdout);Expected behavior and scope
The exported XML text-node classifier should follow the existing REA view rule, including its String.trim() whitespace set, while retaining the existing leaf-text, xml:space, node/depth limits, malformed-document/DOCTYPE refusals and namespace restriction. This is a reader representation fix, not a change to task equality or an expansion of namespace support.
The ECMAScript whitespace and line terminator definitions differ from Python's default Unicode whitespace set. That source diagnosis is separate from the executed before/final controls above.
Related work and duplicate check
I read the actual XML-producing code in #8994 (appExportPythonXml.ts, including _end), the related #8988 XML path, and the current base reader. #8994 explicitly lists this pre-existing U+0085/U+FEFF discrepancy as a known gap; its current implementation still uses child.strip(). It changes namespace/CDATA representation but does not repair this character-class mismatch. Focused searches found no implementation of this specific fix. I have not run those foreign heads or borrowed their runtime results.
This report gives a concrete exported-task failure for that gap. It is independent of the held SQLite text-encoding issue #9004, NULL-key matching #8997, keyfile whitespace #8986 and their local experiments.
Environment and limits
REA6.8.0, main fe677f6; macOS arm64, pinned Node24.22.1/npm11.16.0, native Python3.9. Controlled capture package/window facts are authored fixtures; no live Linux application/GUI capture, Docker build, agentenv service, model/agent, other host runtime or performance claim.
Delivered fix
Normal fork commit 53ca44e is published in PR #9020, opened ready under the owner's instruction. The shared XML text classifier now matches REA's existing trim set. 88 distinct local checks, full static/docs/discovery checks and independent Standards/Spec reviews passed; actual generated reader/verifier controls now fail before and pass after for both characters and the ordinary control, with inputs unchanged.
Current upstream code CI is queued. The opening-head Codex attempt explicitly reported repository code-review usage limits and supplied no concrete code finding; this is not a completed review. Live GUI/service/other-host coverage remains not run.
PR validation update (2026-11-05)
PR #9020 is Ready at fork/upstream head 7d0fd6a8108a0712eac0f23a3375d3340349fce6. Its code CI run completed successfully: 42 jobs, 20 executed successfully and 22 conditionally skipped. All five changed test files actually executed; Source plus eight built shards aggregate to 41,591 passed / 271 skipped, rather than an additional execution.
Three inherited test-fixture/oracle failures from the first run were reproduced and corrected in the existing PR, preserving production contracts, refusal controls and cleanup assertions. Relevant local checks total 203 distinct passes across 15 files, with unchanged-input results reused at their original timestamps; no claim that all files were rerun together. Final frozen Standards and Spec reviews passed before normal hooks and fork delivery. The original XML repair and 2,851 published product bytes are unchanged by these test-only follow-ups.
The final head has no complete matching Codex review yet. The old opening-head review explicitly reported the repository review-usage limit; that does not establish a cause or result for the final head. Full live GUI/Docker/service, real instrumentation engines, other local hosts and performance remain unverified.
2026-11-06 integration follow-up
PR #9020 now normally integrates main a7574d4 at head e3a3b3cfb881a06d6d9950cb005dee1a63f7e7c8. The four earlier CI prerequisite test files are wholly canonical main; the net contribution remains just the shared XML reader, four regression cases and its owning document.
Fresh integration checks: 14 focused files / 194 passed, plus README / 9 passed, 15 distinct files / 203 passed / 0 skipped. Nine public CLI calls (six inspect/task, three actual exports) and the unmodified generated reader/evaluator preserve original bytes and produce matching before-false/final-true controls. Full check/docs/discovery/pack dry-run and isolated Standards/Spec review passed; normal full-byte checks passed before and after fork push.
CI 42143346979 for this new head is still queued at this update; the older 7d0fd6a success above is historical. A complete matching Codex review is not established. GUI/service, real Frida/native engines, installed/updater equivalence, other hosts and performance remain unrun. No new issue/root or PR was created for this maintenance.
Integrated-head CI completion
PR #9020 head e3a3b3cfb881a06d6d9950cb005dee1a63f7e7c8 now has CI 42143346979, attempt 1 SUCCESS: 40 jobs, 17 successful / 23 conditionally skipped. Full logs and all 17 first self-checkouts/parents were verified. XML whitespace regressions: 4 passed in built Linux shard 6. Source plus eight built shards produces the Portable aggregate 41,883 passed / 271 skipped, not additional execution or part of local 203. Linux package baseline and Windows cross-compilation do not establish Windows/Apple runtime or dedicated installed XML/GUI verification.
No source, local tests, commit or fork push was repeated for this CI result. The existing human-declaration tail is unchanged; matching-head Codex completion is still not established and no new concrete review finding is available.
Reader-refactor integration
Main c363f3e moved XML reading into the canonical expat reader but retained the same default-strip mismatch. Fresh reproduction on byte-exact main production owners gave 3 failed / 7 passed (the main XML six all passed); nine public CLI calls and the original exported business functions reproduce both unchanged-final-file disagreements.
The existing #9020 fix now follows that shared reader with a private class whitespace constant, retaining main namespace/CDATA/limit behavior, complete generic producer and existing module-name bindings. Normal merge/fork push delivered 13874d6dea4948aa9fcf1a925f87639042f5889f, parents e3a3b3c + c363f3e. Fresh 15 distinct files / 207 passed / 0 skipped, before9 and after9 actual CLI calls, full check/docs/discovery/pack and isolated Standards/Spec passed. Full post-hook byte gates passed before push and afterward; original XML/capture/task bytes remain unchanged.
CI42151206215 attempt 1 passed on the exact 13874d6 head: 40 jobs, 17 successful and 23 conditionally skipped. Full logs and all 17 first-own checkouts were verified: synthetic 90878a0 has parents CI base de8b2f3 + feature 13874d6, while the feature actually integrates c363f3e. Source 24,135 passed / 16 skipped plus eight shards forms the Portable 42,088 passed / 271 skipped summary, not an additional execution. The four XML regressions and six canonical XML controls ran in separate Linux built shards. Windows/Apple runtime/provider skips do not establish those platform flows; the previous e3a CI remains historical. Matching new-head Codex completion is not established. No live GUI/service, installed/updater equivalence, other-host or performance claim is made, and no new issue/root/PR was created.
Activity