Skip to content

refactor(todos): avoid redundant canonical source encoding and digests - #8372

Open
cocolord wants to merge 8 commits into
mainfrom
codex/small-kernel-transaction-20261108T1445
Open

cocolord wants to merge 8 commits into
mainfrom
codex/small-kernel-transaction-20261108T1445

Conversation

@cocolord

@cocolord cocolord commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

The canonical Todo read path encoded each complete field twice in Python and rehashed unchanged primitives in TypeScript. This proposal reuses the bytes already validated against the full field digest and uses exact equality for unchanged primitives. Containers, changed scalars, missing fields, complete source values and source/revision/lease/refusal/replay protections retain their existing checks.

The change combines the complete-basis refinement from #8374 with this PR's original scalar refinement. It preserves cbda59c6ef1dafff483a8db35e960e853ac6a349 as an ancestor and integrates target main 520a1ab4735dbb640d54e31a799fcaadb4338c38. Report loading (#8360) and the identity-compatible status owner (#8011) are already merged into that baseline. The paired distribution-split RFC retains the original acceptance and negative evidence and records the combined qualification. No provider, configuration, decoder or authority cache is introduced.

Proposal head: 666fb232dc043ca2b9ddd768d07a23c74f0912fd. Runtime qualification used 4e72980bee91c7bbfcedb2eb481b8573113340b3; runtime, apps, packages, scripts and examples are byte-identical through the current head. The last isolated wheel and packaged browser were rebuilt and checked at 7e205166abb5cf209abd156056ff9238680c7c69; the current head only reconciles the root-module fixture and appends paired RFC evidence.

Validation Result and boundary
Loading, canonical source transport, native replan and UTF-8 recovery 82 Python cases passed. Mapping-order provenance and boolean-to-integer refusal remain covered.
Typed Todo, snapshot, work requirements, leases and effect program 105 TypeScript cases passed, zero failures/skips; control-plane typecheck passed on Node 22.22.3.
Real PostgreSQL 16.15 Disposable isolated store/service suites passed 391/11 cases with zero failures/skips. The owned server was stopped afterward. This covers the existing store/service boundary.
Complete CLI lifecycle Four fresh 101-Todo source/wheel × File/SQLite lifecycles preserve the independently verified sum 45, original fixture/artifact fingerprints, scopes, completion time, four receipts, one debit, refusal/replay/restart and two observed normal native exits each.
Isolated wheel All 1,921 present tracked package entries match source bytes. Seventeen existing source-only/doc/media omissions remain. That frontend manifest belongs to the verified packaged head 7e205166a.
Packaged browser at 7e205166a typed-actions, conversation-activity, conversation-history-recovery passed using the isolated wheel's real backend and synthetic upstream. Exact interruption, completion priority and Turn isolation remain asserted.
Inherited kernel-static prerequisite Merged #8011 removed the root chat_status_api.py module, leaving 127 root modules but a pin of 128. The existing fixture now records measured main 520a1ab47 and lowers its pin to 127. The same seven CI prerequisite checks pass locally on CPython 3.11 and 3.13. An unapproved 128th module still fails in the same isolated source tree, and removing it restores the pass. Schema, allowlist and rule code are unchanged.
Standard premerge at the proposal head Six direct and nineteen selected checks passed, with zero failures/advisories/warnings. Bilingual staged/head checks and public-boundary scan passed. Self-merge authority is not granted.
Expanded report family — unresolved hold 70 passed, one failed: test_calendar_actual_cli_preserves_capability_action_without_host raises KeyError: 'turn_envelope'. The same assertion fails on immutable target main 520a1ab47 and the earlier aee777008 baseline. The intended packet-contract qualification remains unresolved; the successful standard subset does not cover this failure.

Earlier source-protection mutation sensitivity remains attributable to the original cbda59c6e qualification: the immutable original passes and an overly broad primitive-equality mutant fails. Runtime source bytes for that owner are unchanged. Preparation/collection failures and an interrupted interim run were retained separately; they are not counted as successful final-head checks. Validation uses macOS arm64, CPython 3.13.5 and Node 22.22.3.

Bounded refactoring removes duplicate encoding and digest work in the existing typed owner and compatibility transport. The existing report and conversation journeys supply the caller boundary; this diff adds no new product entrypoint. Whole-path/full marginal-cost/adoption, installed-host and PostgreSQL host/wheel qualification remain open, together with I3 for at least one minor release, full M1 acceptance, R0/V10/R1, D2/D5/D6/D3 and context/model/split-install. Frozen campaigns and all historical failures remain intact. #8374 remains an open component proposal pending reconciliation.

Independent review of this unchanged head, required CI/readiness, the report-family validation hold and explicit maintainer merge authorization remain separate gates. This submission does not claim completion of the minimal kernel.

The earlier exact-head CI failure is retained: kernel-static-checks failed on the stale 127/128 pin; downstream Stage 2C, checks and aggregate pytest rejected skipped/failed prerequisites. The Frontstage Pages failure aborts strict MkDocs on a stale link in docs/development/bugs/workspace-status-access-errors.md: the target still names loopx/chat_status_api.py after #8011 moved it to loopx/chat/status_api.py. That documentation file is outside this task and Goal's current write scope; its correction and full strict-build qualification remain a separate hold. This pin repair does not establish those workflows passed; the new head requires its own CI and review.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
cocolord and others added 2 commits November 9, 2026 00:58
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@mergify

mergify Bot commented Nov 8, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @cocolord.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 8, 2026
cocolord and others added 4 commits November 9, 2026 01:14
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
…very

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@cocolord cocolord changed the title Avoid redundant digesting of unchanged canonical Todo scalars refactor(todos): avoid redundant canonical source encoding and digests Nov 8, 2026
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 8, 2026
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

This branch has not been deployed

No deployments
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.

1 participant