← Back to Pull requests

fix(agentconfig): minimum reconcile_interval; docs(effectors): match the code #639

Open
unknown opened this pull request with 404 lines diff across 5 files
View on GitHub
unknown unknown commented on Dec 04, 2026 23:27 UTC
Author

Stacked on #638 (effectors/34-delivery-recipient). Items D6 and D7 of the effectors follow-ups decided on 2026-12-04, landing before rc1. One commit per item.

D6: fix(agentconfig): refuse a reconcile_interval under one minute

  • pkg/agentconfig gets MinReconcileInterval = time.Minute, the agent's value. A reconcile_interval under it is refused in three places: effector.defaults, an effector plugin, and an overlay.

  • The error is invalid_value with the agent's message, for example 30s is under the minimum of 1m0s: every Reconcile sends the plugin every effect it holds.

  • Why: the classifier treats reconcile_interval as data-only, so apply_safe applied an overlay under the minimum, and the agent then refused it.

  • A value that doesn't parse, or isn't positive, keeps its duration error.

  • Tests fail without the fix:

  • - TestEffectorValidate: defaults at 59s, plugin at 30s.
    - TestEffectorValidateOverlay: 59s refused, 1m accepted, and the message.
  • For the agent: after it bumps this module, its own reconcileIntervalErrors (cmd/config.go) reports the same path twice. It can drop that check, or use agentconfig.MinReconcileInterval.
  • D7: docs(effectors): make the effector docs match the code (docs only)

  • wire-interface.md

  • - The registration response is shown in kebab-case (delivery-keys, public-key).
    - The heartbeat no longer has held_digest or resync.
    - A new Recovery section covers the startup-only fetch, 24h retries, recorded failures (including the agent's permanent refusals), and re-send: the same undelivered generation, or a redelivered bump.
    - The Responses table gets the 400/413/422/431 and "anything else" rows.
    - ccf-effector-protocol is described as actually sent and read. The API sends it on deliveries and on agent-route responses. The SDK sends it on effector routes but not on the heartbeat. The API never reads it. The agent rejects other values with 400.
    - "No document size cap" is replaced by the agent's 10 MiB cap (413).
  • security.md

  • - A compromised API and a stolen agent key are marked out of scope. The API row is softened: a plugin may act on refs it stored.
    - A row for unauthenticated clients, and a Scope note.
  • operations.md, plugin-runtime.md, effector-interface.md, user-interface.md, triggers.md, lld/api.md, lld/agent.md, lld/ui.md: no resync, a startup-only fetch, and redeliver's two cases.

  • lld/implementation-plan.md keeps its record of what each PR built. A note points to the removal.
  • Decisions to confirm

  • The docs describe the agent's recipient check (421 wrong-recipient, from #638) as part of the protocol. The agent implements it in a separate agent PR.
  • Gate

  • make swag leaves no diff.

  • make test and go vet -tags integration ./... pass.

  • Integration tests pass, run with -tags integration -p 1:

  • - ./pkg/agentconfig/... and ./internal/service/relational/agentcfg/...;
    - handler -run TestAgentConfig.
  • make lint (golangci-lint v2.15.0) shows only the 6 issues already on the base: 3 govet inline in relational/workflows, and 3 SA1019 in the worker risk tests.
  • 🤖 Generated with Claude Code

    Diff: 404 lines (+303 / -101) across 5 files Reviewer: gusfcarvalho Review duration: 667m
    All Vouch review confidence checks passed
    Residual risk 0.39 = Change Risk (0.68) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 404 lines diff across 5 files
    0.68
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.359
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #639"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 43.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 68.0% (HIGH) · Higher = larger blast radius
    68.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 38.8% · Moderate risk
    38.8%