Conversation
…t SPEC_MISMATCH The previous test claimed the README documented FormatDurationNs(2_500_000_000) → "2s", but the README actually documents FormatDurationNs(2_000_000_000) → "2s". The documented example is correct — 2 billion nanoseconds = exactly 2 seconds, rounds to "2s" cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pelikhan
approved these changes
Apr 30, 2026
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 fixes a specification test error in
timeutiland confirms thatttyandtypesare already up to date.timeutilttytypesTest Derivation
All tests are derived from README.md specifications, not from implementation source code. Minimal source reads were limited to exact function signatures, import paths, and verifying the fix.
pkg/timeutilFixed incorrect SPEC_MISMATCH in
TestSpec_PublicAPI_FormatDurationNs.The prior test commented:
But the README actually documents
FormatDurationNs(2_000_000_000) → "2s"— a different input. The documented example is entirely correct: 2,000,000,000 nanoseconds = exactly 2 seconds, whichtime.Duration.Round(time.Second).String()correctly renders as"2s". There is no spec mismatch.The fix replaces the undocumented
2_500_000_000 → "3s"test (and its misleading comment) with the actual documented example:2_000_000_000 → "2s".pkg/ttyNo changes needed. The existing
spec_test.gocovers both documented functions (IsStdoutTerminal,IsStderrTerminal) and the key design decision that both returnfalsein non-TTY environments.pkg/typesNo changes needed. The existing
spec_test.gofully covers all four documented types (BaseMCPServerConfig,MCPAuthConfig,TokenWeights,TokenClassWeights), including JSON round-trip validation and zero-value safety.Spec-Implementation Mismatches
None. The previous apparent mismatch in
timeutilwas a test error, not an implementation deviation.Round-Robin State
timeutil,tty,typestypeutil,workflow,actionpinsReferences: