Skip to content

SPDD sync pass: close forecast migration sync, add MCP secret-scope conformance, and align spec notes#44084

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-07-07
Closed

SPDD sync pass: close forecast migration sync, add MCP secret-scope conformance, and align spec notes#44084
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-07-07

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the 2026-07-07 SPDD work-plan gaps across Forecast, Frontmatter Hash, Effective Tokens, MCP Scripts, and Fuzzy Schedule specs. It closes the highest-risk sync drift by making AIC/ET migration status explicit in Forecast and adding missing conformance coverage for MCP secret-scope norms.

  • Forecast spec sync updates

    • Added a §14 sync mapping row for safeguards cross-reference (§10.7 / Appendix F).
    • Resolved the open AIC-primary / ET-legacy sync item with explicit field-level assertions and tracking reference.
  • Frontmatter Hash deferral clarity

  • Effective Tokens deprecation path

    • Strengthened the deprecation caution block with a direct migration-path link to the AI Credits spec.
  • MCP Scripts spec-to-test linkage

    • Added a §12.1.4 / T-MCP-051 sync-map row pointing to mcp_scripts_renderer_test.go with [Open] status.
    • Added an explicit cross-link from Go sandbox constraints to §10 Safeguards.
  • Conformance tests added

    • Added TestMCPScriptsScopeConformance to exercise SN-SCOPE-01..04 behavior (per-tool bindings, shared-secret handling, and no secret expression leakage in rendered tool config).
    • Added weighted-slot distribution coverage in schedule_fuzzy_scatter_test.go to assert BEST-hour selection frequency is materially higher than OK-hour frequency over a large deterministic sample.
// SN-SCOPE-04 guard: rendered config must not carry secret expressions.
if strings.Contains(toolsJSON, "secrets.ALPHA_ONLY") ||
   strings.Contains(toolsJSON, "secrets.BETA_ONLY") ||
   strings.Contains(toolsJSON, "secrets.SHARED_SECRET") {
    t.Fatalf("tools.json must not contain secret expressions: %s", toolsJSON)
}

Copilot AI linked an issue Jul 7, 2026 that may be closed by this pull request
11 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update daily spec work plan for July 7, 2026 SPDD sync pass: close forecast migration sync, add MCP secret-scope conformance, and align spec notes Jul 7, 2026
Copilot AI requested a review from pelikhan July 7, 2026 17:13
@pelikhan pelikhan marked this pull request as ready for review July 7, 2026 17:38
Copilot AI review requested due to automatic review settings July 7, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR performs an SPDD “sync pass” across multiple specifications and adds/extends Go conformance tests to reduce spec↔implementation drift—especially around Forecast AIC/ET migration clarity, MCP secret-scope isolation, and fuzzy schedule weighted scatter behavior.

Changes:

  • Added MCP secret-scope conformance coverage via a new TestMCPScriptsScopeConformance test ensuring tools.json does not embed secret expressions and that per-tool env bindings remain isolated.
  • Added a deterministic large-sample test to validate the weighted daily scatter distribution favors BEST hours materially more than a sampled BROAD window.
  • Updated several specs (Forecast, MCP Scripts, Frontmatter Hash, Effective Tokens) to clarify sync mappings, deferral acceptance criteria, and deprecation/migration references.
Show a summary per file
File Description
pkg/workflow/mcp_scripts_renderer_test.go Adds secret-scope isolation conformance test for MCP scripts tool rendering.
pkg/parser/schedule_fuzzy_scatter_test.go Adds statistical test asserting BEST-hour weighting is materially higher than a sampled BROAD window.
docs/src/content/docs/specs/mcp-scripts-specification.md Updates sync-map linkage for new test and cross-links Go sandbox constraints to safeguards.
docs/src/content/docs/specs/frontmatter-hash-specification.md Adds in-spec deferral acceptance checklist tied to issue #31983.
docs/src/content/docs/specs/forecast-specification.md Extends sync map and resolves AIC-primary / ET-legacy migration notes with explicit field assertions.
docs/src/content/docs/specs/effective-tokens-specification.md Strengthens deprecation notice by linking directly to the AI Credits spec as the migration path.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +901 to +913
if okTotal == 0 {
t.Fatalf("unexpected zero OK-tier samples in weighted scatter distribution")
}

bestPerHour := float64(bestTotal) / 4.0 // BEST hours: 02-05
okPerHour := float64(okTotal) / 5.0 // OK hours: 19-23
ratio := bestPerHour / okPerHour

// The weighted pool gives each BEST hour weight 3 versus weight 1 for each OK hour.
// Allow tolerance for deterministic hash-modulo skew while preserving the intended 3x shape.
if ratio < 2.7 {
t.Fatalf("expected BEST-hour frequency to be near 3x OK-hour frequency, got ratio=%.3f (best_total=%d ok_total=%d)", ratio, bestTotal, okTotal)
}
@pelikhan pelikhan closed this Jul 7, 2026
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.

[spdd] Daily spec work plan - 2026-07-07

3 participants