SPDD: close spec drift gaps across Effective Tokens, Forecast, Frontmatter Hash, Fuzzy Schedule, and MCP Scripts#34719
Merged
pelikhan merged 2 commits intoMay 25, 2026
Conversation
13 tasks
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Sync Notes section and improve safeguard structure for specs
SPDD: close spec drift gaps across Effective Tokens, Forecast, Frontmatter Hash, Fuzzy Schedule, and MCP Scripts
May 25, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Documentation-only SPDD update that tightens spec↔implementation synchronization by adding clearer safeguard sections, concrete test vectors, and explicit “sync notes” mappings across several reference specifications.
Changes:
- Expanded safeguards/threat-model sections and clarified formulas/examples (ET + Forecast).
- Added/extended sync maps from spec sections/markers to concrete implementation files/functions (ET, Forecast, MCP Scripts, Fuzzy Schedule).
- Made Frontmatter Hash limits and negative test vectors more concrete (1 MiB cap, oversized-input rejection vector).
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/mcp-scripts-specification.md | Adds sync note on SM-IS-01 enforcement status and a security marker sync map. |
| docs/src/content/docs/reference/fuzzy-schedule-specification.md | Adds explicit sync-note mappings for grammar and scattering algorithm. |
| docs/src/content/docs/reference/frontmatter-hash-specification.md | Adds caller-operation requirements plus a concrete 1 MiB limit and oversized-input negative vector. |
| docs/src/content/docs/reference/forecast-specification.md | Adds yield example, moves safeguards into main body, and strengthens sync notes mapping. |
| docs/src/content/docs/reference/effective-tokens-specification.md | Adds structured safeguards, ET test vectors appendix, and an OTel attribute→code mapping table. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 3
Comment on lines
+1248
to
+1249
| | §3.1 Grammar (`schedule: daily around HH[:MM][am/pm][ timezone]`) | `pkg/parser/schedule_parser.go` (`parseFuzzyScheduleExpression`, tokenizer/grammar helpers) | | ||
| | §6 Scattering algorithm | `pkg/parser/schedule_fuzzy_scatter.go` (`scatterDailyTime`, weighted slot selection and deterministic hashing) | |
Comment on lines
+245
to
+251
| `pkg/cli/hash_command.go` MUST invoke the hash API with the following operational sequence: | ||
|
|
||
| 1. The caller MUST resolve the target workflow markdown file path and fail with a descriptive error | ||
| when the file cannot be read. | ||
| 2. The caller MUST pass workflow content and repository path context to the frontmatter hash | ||
| implementation so imports can be traversed deterministically. | ||
| 3. The caller MUST return the computed 64-character lowercase SHA-256 hash string on success. |
| Expected result: | ||
|
|
||
| - Hash computation is rejected before digest generation. | ||
| - Error text includes: `frontmatter input exceeds 1048576-byte limit`. |
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 SPDD cycle identified recurring spec-maintenance gaps: missing/insufficient spec↔implementation sync mapping, safeguard sections that were hard to cross-reference, and a few ambiguous or underspecified norms. This PR tightens those areas across five reference specs with targeted, non-behavioral documentation updates.
Effective Tokens spec (
effective-tokens-specification.md)S-1..S-3) with explicit threat/mitigation mapping for overflow/capping, non-finite numeric rejection, and registry-validation failure handling.Forecast spec (
forecast-specification.md)Frontmatter Hash spec (
frontmatter-hash-specification.md)Caller Operationsunder Implementation Notes describing normative invocation flow forpkg/cli/hash_command.go.FH-TV-NEG-001for oversized-input rejection expectations.MCP Scripts spec (
mcp-scripts-specification.md)SM-JS-01,SM-IS-01, andSM-03linking each marker to implementation files/functions.Fuzzy Schedule spec (
fuzzy-schedule-specification.md)Example (new style used across updates):