Fix: startup crash on shallow Dahua layout + deploy-docs CI micro-calver regex #142

Manually merged
marvin8 merged 2 commits from fix/issue-140-141-regressions into main 2026-08-12 04:03:41 +00:00
Collaborator

Two regression fixes:

  • Fix startup crash on shallow Dahua layout (use snapshot.date, not parents[4]) — closes #140
  • Fix deploy-docs CI regex to accept 4-part micro-calver tags — closes #141
Two regression fixes: - Fix startup crash on shallow Dahua layout (use snapshot.date, not parents[4]) — closes #140 - Fix deploy-docs CI regex to accept 4-part micro-calver tags — closes #141
The date directory for pruning was resolved via source_path.parents[4],
which hard-codes the deep Dahua layout depth. Shallow-layout cameras are
one level shallower, so parents[4] landed on cam_root (a serial number
directory like AF007D8PAG5B66F) instead of the date directory.

Use snapshot.date (already parsed by the adapter) and construct the date
directory path explicitly. Works for both layouts.

Closes #140
🐛 Fix deploy-docs CI regex to accept 4-part micro-calver tags
All checks were successful
/ gitleaks (pull_request) Successful in 19s
/ pr-review (pull_request) Successful in 47s
/ checks (pull_request) Successful in 1m43s
/ publish (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
ae3803cdc2
The version tag guard regex only matched 3-part calver (YYYY.M.D), but
the micro-calver scheme from issue #137 produces 4-part tags like
2026.8.12.2. Add an optional fourth numeric component.

Closes #141
forgejo-actions left a comment

WuMing

Found 1 issue(s). See inline comments below.

## WuMing Found **1** issue(s). See inline comments below.
@ -98,3 +98,1 @@
for source_path in moved_sources:
date_dir = source_path.parents[4] # YYYY-MM-DD/
if date.fromisoformat(date_dir.name) < today:
for snapshot in snapshots:

tests [LOW]

Non-trivial logic change in source file (deriving date directories from snapshots instead of moved_sources) without any corresponding test changes in the diff. Add or update tests covering the date-directory pruning behavior.

**tests** [LOW] Non-trivial logic change in source file (deriving date directories from snapshots instead of moved_sources) without any corresponding test changes in the diff. Add or update tests covering the date-directory pruning behavior. <!-- wuming:sha256:90d36a7e89701e8b369734c47139194ccad21ff59184eef43f9805fff3ebd6bd -->
marvin8 approved these changes 2026-08-12 04:03:08 +00:00
marvin8 manually merged commit 0091a2b520 into main 2026-08-12 04:03:41 +00:00
marvin8 deleted branch fix/issue-140-141-regressions 2026-08-12 04:04:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marvin8/cang!142
No description provided.