Conversation
…nts packages Adds spec_test.go files for three packages derived from their README.md specifications. Documents two spec mismatches: AgenticEngines has undocumented "crush" engine, and all semantic types are claimed to implement String()/IsValid() but EngineName/FeatureFlag do not. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.
Specification Test Enforcement
This PR adds specification-driven tests for the following packages, derived from their README.md specifications (not implementation source code).
timeutilloggerconstantsTest Derivation
All tests use the
TestSpec_prefix and are derived exclusively from README.md specifications. Tests use table-driven patterns with descriptive assertion messages.Spec-Implementation Mismatches Found
timeutil—FormatDurationNsFormatDurationNs(2_500_000_000) // "2s""3s"— Go'stime.Duration.Round(time.Second)rounds 2.5s away from zero to 3s per Go's documented rounding semantics."3s"with aSPEC_MISMATCHcomment. README example should be corrected to"3s".constants—AgenticEnginesAgenticEngines // []string{"claude", "codex", "copilot", "gemini"}"crush"(CrushEngine) not mentioned in spec.SPEC_MISMATCHcomment.constants— Semantic typesString()/IsValid()String() stringandIsValid() boolmethods."EngineNameandFeatureFlagdo NOT implement these methods. OnlyJobName,StepID,CommandPrefix,Version,DocURL, andMCPServerID(String only) do.string()cast directly, withSPEC_MISMATCHcomment.Round-Robin State
timeutil,logger,constants(first run, no prior cache)actionpins,agentdrain,fileutil(alphabetical, no spec tests yet)Notes for
loggerpackagePattern-matching and enabled-state tests in
spec_test.gorequire controlling the package-leveldebugEnvvariable which is initialized at package init time. This is not accessible from an external test package (package logger_test). Tests that require changing DEBUG patterns are skipped whenDEBUGis not set, with appropriatet.Skipmessages. The internallogger_test.goprovides comprehensive coverage of these behaviors.Auto-generated by Package Specification Enforcer workflow — run §24560986208
References:
Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.