Skip to content

🌱 test(adminmcp): cover the non-interval cadence cells and every droppable write-back field - #17562

Merged
hivecommons-hive[bot] merged 1 commit into
v6from
quality/test-cadence-writeback-arms
Nov 10, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v6from
quality/test-cadence-writeback-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Test-only follow-up to #17555 / #17559. The patch-coverage job on #17555 (run 42836395398, 90.3%) left these arms of src/pkg/adminmcp/tools_cadence_writeback_ops.go unexecuted:

  • readAgentCadenceCell string and object arms (lines 150–157): a mode currently set to continuous, a cron string, or a schedule object. The preview's instead of continuously / replaces …, which may have run less often disclosures were never asserted.
  • applyWritebackKindChange null-drop arms for require_label, unlabeled_min_level and own_only (lines 521–526). Only min_level had a row, so an arm clearing the wrong field would still pass.

Adds three cadence rows (continuous, cron string, schedule object) to TestAgentCadencesOpFlagsWidening and 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.go only, 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

…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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible β€” a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking β€”
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly β€” that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/050-review-pending Review swarm requested; awaiting a verdict for the current head role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Nov 10, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the test diff against src/pkg/adminmcp/tools_cadence_writeback_ops.go at 33c1b56. Looks correct to me.

  • The three new shifted rows each land on a distinct branch of readAgentCadenceCell (tools_cadence_writeback_ops.go:150–157: continuous string β†’ 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). The schedule {"cron":"0 */6 * * *"} label matches what json.Marshal of the map produces.
  • The three new null-drop rows each exercise a separate case in applyWritebackKindChange (:519–526), and the expected bodies follow from writebackKindOverrideBody (:468–483) omitting the cleared pointer. hold_gate_notice is a registered kind (src/pkg/writeback/kinds.go:39), so parseWritebackKindPolicyArgs accepts 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

@hivecommons-hive

hivecommons-hive Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer (folded here because this head already carries its hive review):

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.

  • src/pkg/adminmcp/tools_cadence_writeback_ops.go:150-157 β€” readAgentCadenceCell returns kind: "continuous" for the string continuous, kind: "schedule" with the raw string as label for a cron string, and "schedule " + json for an object. The "from cron string" and "from schedule object" rows' expected labels (0 9 * * 1-5, schedule {"cron":"0 */6 * * *"}) match that marshalling exactly.
  • :286-292 β€” continuous lands in the narrow branch (instead of continuously), the two schedule kinds fall to the default widen branch (replaces …, which may have run less often). The widening flags in the three rows (false, true, true) match.
  • :196-200 β€” configured modes are the keys of models; the new shifted fixture carries all four, so none of the three modes is refused by the :265 guard.
  • :519-528 β€” require_label, unlabeled_min_level, own_only each have their own nil assignment; the three new null-drop rows each pair one of them with a sibling field and assert the sibling survives in the PUT body, which is what would catch a mis-wired arm.

Test-only, no changelog fragment needed; patch-coverage and the test (*) shards are green on this head.

Evidence bundle `#1756233c1b56` sha256:993c8800adbe48389ca3ae9c3367239054b5aab586da0b794e5cc608c766b0bd β€” download from the dashboard or `hivectl review evidence #17562`.

@hivecommons-hive
hivecommons-hive Bot merged commit 59a72e0 into v6 Nov 10, 2026
87 of 94 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-cadence-writeback-arms branch November 10, 2026 16:43
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants