Skip to content

[spec-enforcer] test: enforce specifications for console, constants, envutil#33997

Merged
pelikhan merged 1 commit into
mainfrom
spec-enforce-console-constants-envutil-2026-05-22-8a2a224dd4684418
May 22, 2026
Merged

[spec-enforcer] test: enforce specifications for console, constants, envutil#33997
pelikhan merged 1 commit into
mainfrom
spec-enforce-console-constants-envutil-2026-05-22-8a2a224dd4684418

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 22, 2026

Summary

Added comprehensive specification tests for the pkg/console and pkg/constants packages to enforce documented behavior. The console tests validate error formatting functions, error box rendering, terminal controls, and newly introduced public API functions (FormatPromptMessage, FormatSectionHeader). The constants tests ensure documented constant values remain stable across runtime configuration paths, URLs, AWF constants, container images, and default values.

Change Classification

  • Type: test
  • Scope: pkg/console, pkg/constants
  • Breaking: No

Key Changes

File Change Impact
pkg/console/spec_test.go Added specification tests for error formatting functions, error box rendering, terminal controls, and two new public API functions (FormatPromptMessage, FormatSectionHeader) medium
pkg/constants/spec_test.go Added specification tests validating documented constant values including Copilot BYOK, runtime configuration paths, URL constants, AWF constants, container images, GetWorkflowDir function behavior, and various default values medium

Impact Assessment

No downstream impact identified. These changes add test coverage to enforce existing specifications without modifying production code or public APIs.

Commits

599fb3032 test: enforce console and constants specifications

Generated by PR Description Updater for issue #33997 · ● 997.6K ·

Adds spec-driven tests derived from pkg/console/README.md and pkg/constants/README.md.

Console additions:
- ErrorPosition struct fields
- FormatError, FormatErrorChain
- RenderErrorBox, RenderInfoSection, RenderComposedSections
- PrintBanner, ClearScreen, ClearLine
- FormatPromptMessage and FormatSectionHeader added to FormatMessages table

Constants additions:
- CopilotBYOK constants (with SPEC_MISMATCH note for CopilotBYOKDefaultModel)
- GhAwRootDir / GhAwRootDirShell
- URL constants (DefaultMCPRegistryURL, PublicGitHubHost, DocsEnginesURL)
- AWF constants (AWFDefaultCommand, AWFProxyLogsDir, AWFAuditDir, AWFDefaultLogLevel)
- Container images (Node, Python, Alpine, MCPG, Firewall, DevMode)
- GetWorkflowDir behavior (default + env override)
- MaxSymlinkDepth, DefaultActivationJobRunnerImage

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@pelikhan pelikhan merged commit ecfd10c into main May 22, 2026
@pelikhan pelikhan deleted the spec-enforce-console-constants-envutil-2026-05-22-8a2a224dd4684418 branch May 22, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant