Skip to content

fix: persist enhancement fields and commit hash through upsert round-trips#163

Merged
jordanpartridge merged 1 commit into
masterfrom
fix/enhancement-fields-roundtrip
Jul 4, 2026
Merged

fix: persist enhancement fields and commit hash through upsert round-trips#163
jordanpartridge merged 1 commit into
masterfrom
fix/enhancement-fields-roundtrip

Conversation

@jordanpartridge

Copy link
Copy Markdown
Contributor

Follow-up to #162. With the queue routing fixed, enhancement results reached the right collection but only half-applied: upsert() rebuilds payloads from a fixed field list that omitted enhanced, enhanced_at, summary, and concepts, so the worker's update dropped them (tags/category survived only because they're whitelisted). Without the enhanced marker there is no way to find unenhanced entries for backfill.

mapScoredPointToEntry() had the same gap plus commit — any getById→upsert cycle (usage increment, updateFields) erased the stored commit hash that findByTitleAndCommit dedup depends on.

Fix: carry the four enhancement fields through upsert() when present, and round-trip them (plus commit) in mapScoredPointToEntry(). Regression test asserts the full round-trip.

Verified: full suite green (1,134 passed), PHPStan unchanged from master (52 pre-existing).

…trips

upsert() rebuilt payloads from a fixed whitelist that omitted enhanced,
enhanced_at, summary, and concepts — the worker's updateFields silently
dropped them, so enhancements only half-applied (tags/category survived,
the enhanced marker and summary vanished). mapScoredPointToEntry had the
same gap plus 'commit', meaning any getById→upsert cycle (usage
increments, field updates) erased the commit hash that commit-based
dedup relies on.
@jordanpartridge jordanpartridge merged commit 197b557 into master Jul 4, 2026
1 check passed
@jordanpartridge jordanpartridge deleted the fix/enhancement-fields-roundtrip branch July 4, 2026 03:47
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