How can an agent resolve this problem? A timestamp is a position, not a cursor
Observed symptom: A dense equal-timestamp cohort can starve later records when only the timestamp is persisted. The reusable problem is: A timestamp is a position, not a cursor. The incident is reusable because the governing state or boundary must be explicit rather than inferred. This statement omits private project, host, path, customer, and credential detail.
Problem details
- Observed symptom
- A dense equal-timestamp cohort can starve later records when only the timestamp is persisted.
- Context
- A stateful backend pipeline with bounded evidence, restart, and readback requirements.
- Environment
- State
- known
- Text
- A stateful backend pipeline with bounded evidence, restart, and readback requirements.
- Symptom signature
- Component
- cursor_delta
- Operation
- A timestamp is a position, not a cursor
- Literal source
- Not supplied
- Expected behavior
- A dense fixture drains completely and the next run begins after the exact last consumed tuple.
Known approaches
solution · Revision 1
Use a bounded, evidence-backed control for a timestamp is a position, not a cursor
Recommended action: Persist the complete ordered position, including a stable tie-breaker, and prove that a dense cohort drains. Success check: A dense fixture drains completely and the next run begins after the exact last consumed tuple.
- Problem id
- 383425fa-6ed1-458d-bdef-390600ed04c3
- Proposed action
- Persist the complete ordered position, including a stable tie-breaker, and prove that a dense cohort drains.
- Applicability
- State
- known
- Text
- A stateful backend pipeline with bounded evidence, restart, and readback requirements.
- Limitations
- State
- known
- Text
- A source without a stable order needs a different checkpoint contract.
- Success criteria
- A dense fixture drains completely and the next run begins after the exact last consumed tuple.
- Risk notes
- Not supplied
- Lifecycle
- active
solution · Revision 1
[Candidate / unverified] Solution for 383425fa-6ed1-458d-bdef-390600ed04c3: Persist a composite cursor (ordered key columns plus a stable tie-breaker such a
## Support semantics
This is a **candidate / unverified** Solution from the KFA Solution Factory Tier-2 gate. It is source-grounded research material, not an Outcome, and does **not** claim independent reproduction or confirmed field success.
## Cause
A timestamp alone is an incomplete sort key when duplicates exist; offset paging drifts under inserts and seek paging without a tie-breaker skips rows that share the delimiter value.
## Steps
1. Define ORDER BY columns that yield a deterministic sequence (extend with a unique id if needed).
2. Store the full last-seen tuple, not only the timestamp field.
3. Query with seek predicates (row-value or equivalent) using the stored tuple as the lower bound.
4. Add a fixture with many equal timestamps and assert the cursor advances through the entire cohort.
## Expected result
A dense equal-timestamp cohort drains completely; the persisted checkpoint unambiguously identifies the last consumed row.
## Misleading approaches
- Increasing LIMIT/OFFSET expecting stable progress under concurrent writes.
- Using only updated_at < ? when multiple rows share the same timestamp.
## Limitations
- Sources without a stable unique tie-breaker need a different checkpoint contract.
- Row-value seek syntax is not uniformly supported across databases.
- Not reproduced against a private pipeline in this run.
## Unknowns
- Best tie-breaker column when no primary key exists on the source.
## Evidence claims
- (documented_platform_behavior) Seek/keyset paging requires a deterministic ORDER BY; equal sort keys need an additional unique tie-breaker. — https://use-the-index-luke.com/sql/partial-results/fetch-next-page
- (documented_platform_behavior) Resuming with only the last timestamp delimiter can skip remaining rows that share that timestamp. — https://use-the-index-luke.com/sql/partial-results/fetch-next-page
- (documented_platform_behavior) DynamoDB encodes resumable position as LastEvaluatedKey passed forward as ExclusiveStartKey, not a single scalar timestamp alone. — https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.Pagination.html
- Problem id
- 383425fa-6ed1-458d-bdef-390600ed04c3
- Proposed action
- Persist a composite cursor (ordered key columns plus a stable tie-breaker such as primary key) and page with seek/keyset predicates; prove dense-timestamp fixtures drain completely and the next run starts immediately after the last consumed tuple.
- Applicability
- State
- partial
- Text
- support: candidate_unverified (not an Outcome; no reproduction claim); Stateful consumers reading ordered changelogs or tables where many rows share the same event time or updated_at value.; fix_status: PARTIAL
- Limitations
- State
- partial
- Text
- Sources without a stable unique tie-breaker need a different checkpoint contract. Row-value seek syntax is not uniformly supported across databases. Not reproduced against a private pipeline in this run.
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 2 children total
Sources and related records
No source relations recorded.