Skip to content

[BUG](fn-consumer): Use live backfill frontier#7423

Merged
tanujnay112 merged 1 commit into
mainfrom
codex/fn-backfill-live-frontier
Jul 13, 2026
Merged

[BUG](fn-consumer): Use live backfill frontier#7423
tanujnay112 merged 1 commit into
mainfrom
codex/fn-backfill-live-frontier

Conversation

@tanujnay112

@tanujnay112 tanujnay112 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description of changes

During attached-function backfill, the executor processes the live record segment through the collection's current log position, but the batch was labeled with the earlier incremental fetch frontier. Idempotent functions therefore saved a frontier behind the records they had actually processed, allowing later executions to count overlapping records again.

  • Derive the executor's pulled log offset from the existing is_for_backfill signal.
  • Use the input collection's live log position for both the backfill batch frontier and the completion progress recorded after execution.
  • Keep ordinary execution on the fetched pulled_log_offset.
  • Rename the executor batch field from completion_offset to pulled_log_offset to reflect its actual meaning.

Test plan

  • cargo test -p worker test_resolve_pulled_log_offset
  • cargo test -p worker count_to_file_async::tests
  • cargo clippy -p worker --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

Migration plan

No migration required. This changes an internal Rust field name and attached-function backfill frontier selection.

Observability plan

Existing attached-function completion logs expose the resulting completion frontier.

Documentation Changes

None; no user-facing API changes.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions

Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@blacksmith-sh

This comment has been minimized.

@tanujnay112
tanujnay112 force-pushed the codex/fn-backfill-live-frontier branch from 74383c1 to b90231a Compare July 10, 2026 22:24
.collection_info
.collection
.log_position,
) as u64,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize we should never hit this. It still feels wrong to just cast.

@tanujnay112
tanujnay112 merged commit c167868 into main Jul 13, 2026
175 of 177 checks passed
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.

2 participants