Closed
SPDD sync pass: close forecast migration sync, add MCP secret-scope conformance, and align spec notes#44084
Conversation
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
Contributor
There was a problem hiding this comment.
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
TestMCPScriptsScopeConformancetest ensuringtools.jsondoes 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) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
§10.7/ Appendix F).Frontmatter Hash deferral clarity
Deferral acceptance criteriasubsection under§Sync Notes.Effective Tokens deprecation path
MCP Scripts spec-to-test linkage
§12.1.4 / T-MCP-051sync-map row pointing tomcp_scripts_renderer_test.gowith[Open]status.§10 Safeguards.Conformance tests added
TestMCPScriptsScopeConformanceto exercise SN-SCOPE-01..04 behavior (per-tool bindings, shared-secret handling, and no secret expression leakage in rendered tool config).schedule_fuzzy_scatter_test.goto assert BEST-hour selection frequency is materially higher than OK-hour frequency over a large deterministic sample.