Skip to content

fix(enhancives.lic): v0.0.4 add time-charged support#2314

Merged
mrhoribu merged 1 commit intomasterfrom
fix/enhancives-v0.0.4
May 7, 2026
Merged

fix(enhancives.lic): v0.0.4 add time-charged support#2314
mrhoribu merged 1 commit intomasterfrom
fix/enhancives-v0.0.4

Conversation

@mrhoribu
Copy link
Copy Markdown
Contributor

@mrhoribu mrhoribu commented May 6, 2026

Updated version to 0.0.4 experimental with new features for time-charged enhancives, including support for expiry reporting and time threshold settings.

Summary by CodeRabbit

  • New Features
    • Added full support for time-charged enhancives with automatic lifespan and expiration tracking.
    • Introduced configurable time threshold (default 7 days) for expiration warnings.
    • Extended monitoring to track both charge status and expiration dates with distinct alerts.
    • Enhanced reporting with dedicated section for time-charged enhancive details.

Updated version to 0.0.4 experimental with new features for time-charged enhancives, including support for expiry reporting and time threshold settings.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

The Enhancives script now supports time-charged items with lifespan-based expiry tracking. Changes include regex patterns for time-charged parsing, a timezone-aware expiry date parser, persistent threshold settings (default 7 days), item sorting and detection, separate history tracking, a second reporting table, and enhanced monitoring to alert on charges and near-term expirations.

Changes

Time-Charged Enhancive Support

Layer / File(s) Summary
Data Schema & Patterns
scripts/enhancives.lic (lines 19–61)
Changelog updated to v0.0.4; new regex patterns added for time-charged and enhanced item parsing; timezone offset map introduced to normalize TZ abbreviations for expiry parsing.
Core Parsing Logic
scripts/enhancives.lic (lines 63–76)
parse_expiry enhanced with timezone offset lookup and safe fallback to Time.parse, enabling robust date extraction across formats.
Storage & Initialization
scripts/enhancives.lic (lines 89–98)
db_read seeds a default time_threshold of 7 days when not present and persists it; ensures backward compatibility.
Item Management
scripts/enhancives.lic (lines 120–122, 168–183)
Time-charged items are sorted by soonest expiry for prioritized reporting; public accessors time_charged_items? and time_threshold? expose the collection and threshold state.
Detection & Public API
scripts/enhancives.lic (lines 160–167, 199–208, 276–281)
Methods time_threshold, new_time_setting, and detect_expirations allow querying and updating the expiry window; detect_expirations returns item names expiring within a specified window.
History & Persistence
scripts/enhancives.lic (lines 301–347)
add_history skips time-charged entries to maintain separate histories; new add_time_history persists time-charged expiry data independently and is integrated into save_history flow.
Reporting & User Guidance
scripts/enhancives.lic (lines 230–242, 388–393)
A second table in reports displays time-charged items with expiry and recharge details; help text expanded to document time_threshold settings and rescan command.
Monitoring Integration
scripts/enhancives.lic (lines 417–439)
Main loop now computes both charges and expirations, issuing distinct alerts for threshold breaches and imminent expirations; early help path added on first run or "help" command.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding time-charged support to the enhancives script with a version bump to v0.0.4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/enhancives-v0.0.4

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 and usage tips.

@mrhoribu
Copy link
Copy Markdown
Contributor Author

mrhoribu commented May 7, 2026

@coderabbitai review again

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Tip

For best results, initiate chat on the files or code changes.

@mrhoribu Sure! I'll kick off a full review of the PR right away.

[full_review]

@mrhoribu mrhoribu merged commit 885bbbf into master May 7, 2026
4 checks passed
@mrhoribu mrhoribu deleted the fix/enhancives-v0.0.4 branch May 7, 2026 20:20
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