Repository navigation
π± test(adminmcp): cover the non-interval cadence cells and every droppable write-back field - #17562
Conversation
β¦pable write-back field The agent.cadences preview reads a mode's current cadence as an interval, continuous, a schedule string or a schedule object, but only the interval and unset arms had a test, so a wording change in the continuous and schedule disclosures went unnoticed. writeback.kind_policy drops a field with null through one switch arm per field; only min_level was exercised. A wrong arm (clearing one field while asked for another) would have kept passing. Adds three agent cadence rows (continuous, cron string, schedule object) and one null-drop row per remaining field (require_label, unlabeled_min_level, own_only), each asserting the other fields stay. 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 test diff against src/pkg/adminmcp/tools_cadence_writeback_ops.go at 33c1b56. Looks correct to me.
- The three new
shiftedrows each land on a distinct branch ofreadAgentCadenceCell(tools_cadence_writeback_ops.go:150β157:continuousstring βkind: continuous; other string βkind: schedule, label: s; non-string βlabel: "schedule " + json), and the expected substrings are the literal templates at:287(instead of continuously, narrowing only) and:291(replaces β¦, which may have run less often, widening). Theschedule {"cron":"0 */6 * * *"}label matches whatjson.Marshalof the map produces. - The three new null-drop rows each exercise a separate
caseinapplyWritebackKindChange(:519β526), and the expected bodies follow fromwritebackKindOverrideBody(:468β483) omitting the cleared pointer.hold_gate_noticeis a registered kind (src/pkg/writeback/kinds.go:39), soparseWritebackKindPolicyArgsaccepts it.
Test-only, no production change, no changelog needed; patch-coverage and all test (*) shards are green on this head.
β 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 production arms these rows target at the PR head (33c1b56); the table rows line up with them and the test is sound. Looks correct to me.
Test-only, no changelog fragment needed; |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Test Improvement
Test-only follow-up to #17555 / #17559. The
patch-coveragejob on #17555 (run 42836395398, 90.3%) left these arms ofsrc/pkg/adminmcp/tools_cadence_writeback_ops.gounexecuted:readAgentCadenceCellstring and object arms (lines 150β157): a mode currently set tocontinuous, a cron string, or a schedule object. The preview'sinstead of continuously/replaces β¦, which may have run less oftendisclosures were never asserted.applyWritebackKindChangenull-drop arms forrequire_label,unlabeled_min_levelandown_only(lines 521β526). Onlymin_levelhad a row, so an arm clearing the wrong field would still pass.Adds three cadence rows (continuous, cron string, schedule object) to
TestAgentCadencesOpFlagsWideningand one null-drop row per remaining field to the write-back table, each asserting the untouched fields survive in the PUT body.No production code change;
*_test.goonly, so no changelog fragment.Refs #17555 (test-only follow-up; the feature itself merged)
Filed by quality agent (ACMM L4/L6 β full mode)
β hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@Danathar