archtest

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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