Skip to content

SLOP-239: parse archive period names by format, not underscore count - #17

Open
tosfos wants to merge 1 commit into
masterfrom
SLOP-239-period-name-parsing
Open

SLOP-239: parse archive period names by format, not underscore count#17
tosfos wants to merge 1 commit into
masterfrom
SLOP-239-period-name-parsing

Conversation

@tosfos

@tosfos tosfos commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse_previous_period_from_archive_name stripped only the last _token group, truncating hour/minute/second period names (2026-08-20_10) to day precision (2026-08-20).
  • derive_granularity_to_lock then locked at the wrong granularity; every subsequent run hit BREAK before collecting any group — log archiving stalled permanently once finer-grained archives existed (reproduced end-to-end).
  • The parser now matches the timestamp grammar from the start of the name (period fields are underscore-separated, so suffix stripping must be format-aware), and derive_granularity_to_lock handles hour/minute/second previous periods (previously dead-code determine_granularity_to_lock did this correctly).

Jira: SLOP-239

Test plan

  • Unit checks: year/month/day/hour/minute/second names parse to full period; task suffixes still stripped
  • derive_granularity_to_lock: prev hour -> minute, prev minute -> second, prev second -> none
  • E2E: prev minute archive + logs in same minute now derives granularity_to_lock: second (was day); hour-archive continuation creates adjacent archives again
  • shellcheck + bash -n clean

parse_previous_period_from_archive_name stripped the last _token
group, so hour/minute/second periods (2026-08-20_10 etc.) were
truncated to day precision. derive_granularity_to_lock then locked at
the wrong granularity and every subsequent archiving run bailed out
with BREAK before collecting a group, stalling log archiving
permanently once finer-grained archives existed.

Match the timestamp grammar from the start of the name to separate
period from optional task suffix, and teach derive_granularity_to_lock
about hour/minute/second previous periods.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 52e24357-6b47-4096-b542-1ef880e19264


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🐳 The image based on bb988c6a commit has been built with 20260822-17 tag as ghcr.io/wikiteq/cron:20260822-17

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