← Back to Pull requests

feat(work-context): sync the surface:telegram token on mctl-telegram-preview #1550

Closed
unknown closed this pull request without merging on Oct 04, 2026 01:01 UTC
View on GitHub
unknown unknown commented on Oct 04, 2026 00:59 UTC
Author

Follow-up to #1540/#1542 for the owner's live session on mctlhq/mctl-telegram#443.

Why: the owner sent /mctl link <code> to Saved Messages and got the plain "Unknown command" help. The listener that serves those messages runs on mctl-telegram-preview:

  • preview has AGENT_ENABLED=true, logs communication agent HTTP surface enabled, and is polled by agent-worker-preview;

  • production has no agent surface, and its logs show no listener.
  • The adapter enabled on production in #1542 therefore never sees the command. On preview, Router.Work is nil, which produces exactly that reply.

    This PR (step 1): a workContext block on preview, with enabled: true, tenant: admins, and the same platform/mctl-api/surface-tokens / telegram-token (one surface:telegram principal). This renders the labs-mctl-telegram-preview-base-service-work-context ExternalSecret and MCTL_WORK_ITEM_TENANT=admins. featureEnabled stays false; step 2 flips it once the Secret has synced. That is the same order as production, because the server refuses to start with the feature on and no token, and the strategy is Recreate.

    Impact: preview restarts once, a brief pause for the agent soak. No behaviour change.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_012kWiYf1BX6wcXB2kc8x15U

    Diff: 169 lines (+126 / -43) across 2 files Reviewer: claude[bot] Review duration: 2m
    All Vouch review confidence checks passed
    Residual risk 0.36 = Change Risk (0.58) × (1 − Review Confidence (0.39)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.58 · 169 lines diff across 2 files
    0.58
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 57% · Reviewer familiarity: 35%
    39%
    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.307
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.058
    Real PR Conversation Timeline
    1 comments
    "Review active on #1550"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 39.1% 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: 58.4% (MEDIUM) · Higher = larger blast radius
    58.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: 39.1% · Lower = rushed or shallow review
    39.1%
    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: 35.5% · Moderate risk
    35.5%