← Back to Pull requests

fix(charts): seed the mesh policy only when the control plane has none #763

Closed
unknown closed this pull request without merging on Oct 20, 2026 08:04 UTC
View on GitHub
unknown unknown commented on Oct 19, 2026 16:14 UTC
Author

Why

The chart's bootstrap Job runs on every helm upgrade and POSTed the whole mesh policy each time. So each upgrade silently erased edits made in the console or with POST /policies. The Kubernetes guide says that the database is the source of truth once it has a policy.

What changed

  • The Job reads GET /admin/policy and seeds the policy only when it holds no roles. Otherwise it logs that it skipped the seed. This matches agentmesh-one --policy-file.

  • The seed no longer includes the mesh:role:agentmesh-box role and binding. Their binary was removed in f6abfb82.

  • The bootstrap values comment and the Kubernetes guide say that a later change to bootstrap. does not change the policy.
  • Scope

  • The Job still mints the router bootstrap token on every run.

  • The testnets do not use this chart, and their deploy workflow keeps posting their policy on every deploy.
  • Blast Radius

    An operator who changed the bootstrap. values and ran helm upgrade to apply them now has to make the change in the console or with POST /policies. This makes sense since this job is only used to bootstrap the mesh.
    If the Job cannot read the policy, it fails and retries instead of overwriting it.

    Verification

  • The rendered Job script ran against a local control plane. The install run seeded the policy. A role added after it survived the upgrade run, which logged the skip. With a wrong admin token, the script exited with code 22 and changed nothing.

  • The old template's upgrade run on the same database erased that role.

  • make helm-test passes with two new tests, and both fail on the old template. make helm-lint passes.
  • Diff: 208 lines (+156 / -52) across 2 files Reviewer: aojea Review duration: 949m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 208 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.320
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #763"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 36.4% (MEDIUM) · Higher = larger blast radius
    36.4%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 14.4% · Safe to merge
    14.4%