hyperhive/hive-agent/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 1e67f56249 hive-sh4re: one saturating_age for every loose-end producer
`age_seconds` is documented on the LooseEnd enum as saturating to zero on
any clock anomaly, but the derivation was in three places: hive-c0re had a
named `saturating_age` helper with tests, and the in-agent socket server
hand-rolled the same two lines twice, untested.

Move the helper to hive-sh4re::inbox, beside the enum whose contract it
implements and inside the one crate both producers already depend on. Its
three tests move with it (not dropped) and gain two arms: the whole-i64
range, where the saturating_sub is what stops the subtraction overflowing,
and a far-past control so those zeros are the clamp firing rather than the
function bottoming out on large inputs.

The two clamps are not redundant, which is what `to_loose_end`'s doc got
wrong: it credited "saturating" for the zero, but saturating_sub bottoms
out at i64::MIN, still negative. The try_from is what yields 0.

Also cover the two projections themselves, which is the part the shared
helper cannot: that a reminder ages from created_at rather than due_at,
and a todo from updated_at, with a future timestamp reading 0 through
both and a past-timestamp control on each.
2026-09-02 14:20:25 +02:00
..
web_ui docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
claude_md_watch.rs hive-agent: warn + emit an OTEL gauge on a grown CLAUDE.md 2026-08-26 18:34:36 +02:00
db_migrate.rs todos: reopen an acked keyed row when the caller says so 2026-08-13 12:55:20 +02:00
disk_watch.rs todos: reopen an acked keyed row when the caller says so 2026-08-13 12:55:20 +02:00
events.rs hive-agent: trim narrative comment bloat in doc comments (#3901) 2026-09-02 01:52:53 +02:00
harness_state.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
identity.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
login.rs docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
login_session.rs refactor(#2464): rename hive-ag3nt crate to hive-agent, collapse lib into main 2026-07-15 16:09:39 +02:00
main.rs docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
mcp_config.rs docs: three comments point at a nix directory that does not exist 2026-09-02 14:19:03 +02:00
otel_turn_metrics.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
paths.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
plugins.rs refactor(#2464): rename hive-ag3nt crate to hive-agent, collapse lib into main 2026-07-15 16:09:39 +02:00
prompt.rs hive-c0re/hive-sh4re: remove the ask/answer wire protocol + core routing 2026-08-30 01:18:17 +02:00
reminder_timer.rs docs/hive-c0re: fix ask/answer removal doc gaps argus caught on #3741 2026-08-30 03:02:31 +02:00
reminders.rs hive-sh4re: split approval-queue schema into its own topic module 2026-08-10 23:05:18 +02:00
serve_common.rs hive-agent: remove dead bash-task- wake_from special-case 2026-08-14 12:09:02 +02:00
state_entry_watch.rs fix hint text per argus review: group into subdirs, not split into more top-level files 2026-08-18 22:07:05 +02:00
stats.rs hive-sh4re: split approval-queue schema into its own topic module 2026-08-10 23:05:18 +02:00
stream_enrich.rs hive-agent: pin classify_tool_result's own 120-char boundary 2026-09-02 12:29:34 +02:00
term_msg.rs Trim negative-space comments per mara's review 2026-08-30 21:31:33 +02:00
todo_server.rs hive-sh4re: one saturating_age for every loose-end producer 2026-09-02 14:20:25 +02:00
todos.rs todos: reopen an acked keyed row when the caller says so 2026-08-13 12:55:20 +02:00
turn.rs hive-agent: guarantee a wake after a self-requested /compact 2026-08-13 23:17:10 +02:00
turn_stats.rs swap hive-claude to the crates.io registry dependency (#2931) 2026-08-02 14:19:26 +02:00
vacuum.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00