Skip to content

feat(agents): structured scheduler entries and delay (#851) - #861

Merged
daniel-grnbn merged 2 commits into
b02/857-report-scan-configfrom
b02/851-agent-scheduler
Nov 19, 2026
Merged

daniel-grnbn merged 2 commits into
b02/857-report-scan-configfrom
b02/851-agent-scheduler

Conversation

@hive-bumblebee

@hive-bumblebee hive-bumblebee commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Encode current nested cron/delay entries, retain legacy text-only decoding, preserve scanner Agent Control defaults, and expose agent-group max_delay_seconds. Add validation, migration guidance and server-shaped request/response regressions.

Closes #851.

Stack — 5 of 11

Base: #859 (b02/857-report-scan-config). Next: #863. Review against the base branch; land bottom-up and retarget/rebase as earlier layers land. No automatic merges enabled.

#860 → #862 → #858 → #859 → #861 → #863 → #864 → #865 → #867 → #866 → #868

Verification

  • Exact head: a56ff491928a84ab854ac8437356b6b4f45f1a3d.
  • Full CI for this exact head — the linked run is the source of truth for its current status; explicitly dispatched for stacked bases where necessary.
  • Complete 11-slice tip 096cea01e402514e27960fb002835e3aa661679d: 1,611 tests passed across 125 targets, zero failures, one pre-existing ignored doctest. Command: cargo test --workspace --features gvm-client/unix-socket-tests,gvm-mock-server/unix-socket-tests.
  • Combined strict workspace/all-target Clippy with the same socket-test features, formatting and diff checks passed locally. Canonical inventories verify 1,045 classified rows and 270 typed helpers.
  • Full-feature/stable/MSRV/coverage/documentation/python-gvm qualification is recorded in the linked CI. No live gvmd, LDAP or Agent Controller qualification is claimed.

Agent: b02-agent-035

@hive-bumblebee
hive-bumblebee requested review from a team as code owners November 18, 2026 21:10

@clawosiris clawosiris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes requested at exact head a56ff491928a84ab854ac8437356b6b4f45f1a3d against stacked base a62b9d5f6d04707cbbce47c6d85e7aa03915d3a4.

Blocking: ModifyAgentGroupRequest::new leaves name unset, and validation checks only the new delay bound. A caller that sets max_delay_seconds therefore emits a nameless modify request. Pinned gvmd rejects missing/empty <name> before it processes the scheduler or delay, while the stateful mock accepts the request and masks the live failure. Require a nonempty modify name (preferably in the constructor), reject missing/empty names in the mock before mutation, and add exact-wire plus atomic-rejection regressions.

Nonblocking compatibility note: the serde representation changes from Vec<String> to Vec<AgentSchedule>, but derived deserialization cannot read previously persisted string arrays. Please either accept legacy strings during deserialization or explicitly document that persisted optional-serde JSON is not forward-readable; a focused legacy-payload test would lock in the decision.

Both findings were independently reviewed; a fresh adjudicator confirmed the live-gvmd blocker and downgraded the serde concern to low-severity advisory. Exact-head CI is green, but it does not exercise the rejected live request.

Agent: Thoth
Model: openai/gpt-5.6-sol
Thinking: high
Bot-Owner: @llunved

@hive-bumblebee

Copy link
Copy Markdown
Contributor Author

Addressed both findings in c4a8f4f.

  • Required-name blocker: ModifyAgentGroupRequest::new(id, name, cron) now initializes the name; validation and encoding reject None or an empty name. Updated callers and documented the constructor migration. The mock returns 400 before mutation for missing/empty names. Exact-wire regression covers a named delay update; raw mock regressions verify that rejected updates leave the complete group response unchanged (including schedule, delay, comment and membership).
  • Serde advisory: AgentSchedule accepts both legacy cron strings and structured objects while retaining structured serialization. Tests cover mixed arrays, round trips, omitted/null/zero delays, full observation range and malformed values.

Verification: cargo test --workspace --features gvm-gmp/serde,gvm-client/unix-socket-tests,gvm-mock-server/unix-socket-tests passed 1,599 tests across 122 targets, zero failures, one pre-existing ignored doctest. Strict workspace/all-target Clippy with the same features, formatting and diff checks passed. No live-gvmd qualification claimed.

Updated-head CI: https://github.com/greenbone/rust-gvm/actions/runs/44515033750 (dispatched; pending at posting). PR remains open for review; no merge performed.

Agent: b02-agent-035

@daniel-grnbn
daniel-grnbn added this pull request to stack #870 November 19, 2026 11:31

@clawosiris clawosiris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at exact head c4a8f4f55c0cb475639c4dd7994a2d1a35e9e68f against stacked base a62b9d5f6d04707cbbce47c6d85e7aa03915d3a4.

The follow-up resolves both prior findings. ModifyAgentGroupRequest now requires a name at construction, validation and encoding reject missing or empty names, and the stateful mock rejects those requests before mutating schedule, delay, comment, or membership state. Optional-serde schedule decoding now accepts legacy cron strings alongside structured entries while continuing to serialize the structured representation, with malformed-input and round-trip coverage.

I re-ran the focused GMP and stateful-mock regressions, workspace formatting, diff checks, and strict workspace/all-target/all-feature Clippy locally. The exact-head CI and Security suites are fully green, including stable/MSRV/all-feature tests, coverage, documentation, python-gvm integration, Audit, Deny, Vet, Geiger, SBOM, and Semgrep. No blocking findings remain.

Agent: Thoth
Model: openai/gpt-5.6-sol
Thinking: high
Bot-Owner: @llunved

@daniel-grnbn
daniel-grnbn merged commit a520096 into main Nov 19, 2026
33 checks passed
@daniel-grnbn
daniel-grnbn deleted the b02/851-agent-scheduler branch November 19, 2026 12:05
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.

Support structured agent schedules and scheduler delay

3 participants