Repository navigation
π± test(crux/agent): pin LastLaunchAt wiring from manager to watchdog observation - #17350
Conversation
β¦servation The #17320 relaunch boot grace depends on WatchdogFleet.Observe copying lastCLILaunchAt into Observation.LastLaunchAt and on markCLILaunchedLocked stamping it. Both executed under existing tests but neither value was asserted, so dropping either write left the suite green. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible β a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
Read the tree at v5, not just the diff. Looks correct to me.
src/crux/agent/watchdog_fleet.go:451-455βmarkCLILaunchedLockedwritesStartedAt,launchGen++,lastCLILaunchAtin one place;TestMarkCLILaunchedLockedStampsEveryLaunchFieldasserts all three after two calls (gen+2, both timestamps ==second), which is exactly what would catch a dropped write.src/crux/agent/watchdog_fleet.go:157,172βObservecopiesagent.lastCLILaunchAtunderm.mu.RLockintoObservation.LastLaunchAt;TestWatchdogObserveCarriesLastLaunchAtsets the field directly onm.agents["a1"]with no lock, which is fine here sinceObserveis the only other accessor in the test and runs after.- Zero-value assertion added to
TestWatchdogObserveCarriesStartedAtis consistent:newWatchdogTestManagernever callsmarkCLILaunchedLocked, solastCLILaunchAtis the zerotime.Time.
Body matches the diff: test-only, no changelog fragment needed. The two red checks (FOSSA license scan, docker (contributor)) cannot be caused by a _test.go-only change; every test (agent n/5) shard is green.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read the tree on
Test-only change; the changelog exemption claim is consistent with Looks correct to me. Not approving β that is a human's signature. hive/awaiting-ci: π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Evidence bundle `#173504153f62` sha256:6a9e9c81bc71434b3170daee13d694445c1e48a0e636af3f964343b4c8df418e β download from the dashboard or `hivectl review evidence #17350`. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Test Improvement
The #17320 fix dates watchdog boot grace from the most recent CLI relaunch. That only works if two writes survive:
markCLILaunchedLockedstampinglastCLILaunchAt, andWatchdogFleet.Observecopying it intoObservation.LastLaunchAt. Both lines already ran underTestWatchdogObserveCarriesStartedAt, so they count as covered, but nothing asserted the value β deleting either write leftcrux/agentgreen while the classifier silently fell back to the agent's first start and relaunches lost their grace again.This pins the wiring from the manager side (the watchdog side is already pinned by
TestClassifyLoginChromeAfterMidLifeRelaunch):TestWatchdogObserveCarriesStartedAtnow also assertsLastLaunchAtis zero when no CLI launch has been recorded.TestWatchdogObserveCarriesLastLaunchAt: a relaunch 22h after start reaches the observation asLastLaunchAtwithout rewritingStartedAt.TestMarkCLILaunchedLockedStampsEveryLaunchField:StartedAt,launchGenandlastCLILaunchAtmove together, one increment per launch.Test-only (
_test.go), so no changelog fragment per the exemption set. Not run locally per AGENTS.md; CI is the verdict.Refs #17349 β this is the fourth "covered but never asserted" site in the repository; the issue proposes the mutation gate that would have caught it in the PR, and stays open for that decision.
Filed by quality agent (ACMM L4/L6 β full mode)
β hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88