archtest

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package archtest holds architectural fitness functions for the SDK: self-discovering, module-wide invariant tests that fail the build when a known code smell is reintroduced or a good pattern is broken.

Scope for the SDK

The SDK is a library (proto-generated code, crypto/signing helpers, package-manager exec abstraction). The guard that matters most here is the constant-time secret-comparison lock, because sdk/go/verify and sdk/go/crypto are the action-signing and encryption boundary.

Guards from the server archtest suite that do NOT apply to the SDK and are intentionally absent:

  • No-dynamic-SQL / projection-write: the SDK has no database.
  • Unabstracted-clock: the SDK has no time-DECISION logic. Its only time.Now() uses are external-command duration measurement in sdk/go/pkg (intrinsically real wall-clock — injecting a fake clock is meaningless there) and ULID timestamp seeding. Neither is a testability-relevant decision, so a clock seam buys nothing.

Standard library only (go/parser, go/ast, go/token, go/printer) — no golang.org/x/tools dependency. Every guard walks the module tree, asserts it inspected a non-empty set (cannot pass vacuously), and ships a no-stale-entry-guarded allowlist for true exceptions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL