Scoped field updates and context initialization issue#346
Merged
rtibbles merged 4 commits intoJul 9, 2026
Merged
Conversation
Contributor
🔵 Review postedLast updated: 2026-07-08 23:54 UTC |
rtibblesbot
suggested changes
Jul 8, 2026
rtibblesbot
left a comment
Contributor
There was a problem hiding this comment.
PR #346 scopes sync-stage save() calls to update_fields and fixes the SessionContext.is_push coercion bug. The context fix and its regression test are clean, but one update_fields list drops fields the same code path assigns.
- blocking —
validate_and_create_buffer_datano longer persistsbytes_sent/bytes_receivedlocally (inline). - nitpick — a few
update_fieldslists include fields the branch doesn't always mutate (operations.py:1112server_fsicon the client branch;operations.py:1504records_totalon push;core.py:336both stage fields). Harmless since in-memory equals persisted, but if the goal is strict scoping they could be narrowed. Not worth changing on their own. - suggestion — no test pins the "only these fields are written" contract; a future edit that mutates a field but forgets to extend
update_fieldswould silently regress with no failure. Theis_pushfix is well-tested; consider a targeted test that mutates a field out-of-band and asserts a scoped save leaves it intact.
CI: the plain unit-test matrix was pending and the app-token check is failing (unrelated permissions step, not this diff) — hence COMMENT-level CI, but the byte-accounting bug drives REQUEST_CHANGES.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
Ran a phased review pipeline over the pull request diff:
- Classified the diff to select review passes (core, frontend, backend) and whether manual QA was required
- Core review pass checked correctness, design, architecture, testing, completeness, and DRY/SRP/Rule-of-Three principles
- Specialized frontend/backend review passes applied framework-specific lenses where those files changed
- For UI changes: manual QA and an accessibility audit against a live dev server, when available
- Checked CI status and linked issue acceptance criteria
- Synthesized one review from those passes and chose the verdict from the findings, CI status, and QA evidence
589deea to
f2f513c
Compare
rtibbles
approved these changes
Jul 9, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Changes make sense and align with the PR description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TransferSessionandSyncSessionto only the fields that should have changedis_pushofNonewhenTransferSession.pushisFalseTODO
Reviewer guidance
The tests passed with the scoped changes, and the regression test covers the context bug. Is that sufficient?
The context bug is more important in the context of Kolibri's sync-extras-plugin, since it was passing in a hardcoded value to
is_pushKolibri's morango integration tests pass with these updates.
Issues addressed
Related to this investigation:
AI Usage
AI found the issue in the
SessionContext.