Skip to content

fix(design): check the design test bound and source hex values #4906

Closed

Description

@dan-petty

Problem Description

The review of #4811 (issue #4738, merged) found two problems in the design token checks:

  1. The CI step "Run the Design Tests" of the job design-tokens has a limit of 2 minutes, but the bound of one test is 600 s (timeout = 600 in pyproject.toml). This breaks the rule "Nested Time Limits" of ARCHITECTURE.md: "Set the bound of one test shorter than its step." When a design test hangs, the runner stops the step at 120 s, and pytest-timeout gives no diagnostic. The contract test of the job checks step < job, but not test < step.
  2. Each color in design/tokens/*.tokens.json holds its value two times: components and hex. Style Dictionary reads only components, and no check compares the two. When a person edits only hex, the outputs do not change, the CI diff step passes, and the source shows a color that no output has.

Reproduction Steps

  1. grep -n -A3 "Run the Design Tests" .github/workflows/ci.yml shows timeout-minutes: 2 and uv run pytest tests/design -n 0 with no --timeout.
  2. In a checkout of main, change "hex": "#ffffff" of color.bg in design/tokens/light.tokens.json to #fffffe, and run make design-tokens with the locked Style Dictionary.
  3. git diff --stat shows only the source file. uv run pytest tests/design passes.

Expected vs Actual Behavior

Expected: the bound of one design test is shorter than its step, and a check fails when the hex of a source color is not the color of its components.

Actual: the test bound (600 s) is longer than the step (120 s), and a hex that differs from components passes every check.

Environment Diagnostics

main at the merge of #4811; Style Dictionary 5.8.0 from src/devops_cli/tools_lock/style-dictionary/.

Logs, Traces, or Terminal Output

After step 2: git diff --stat gives design/tokens/light.tokens.json | 2 +- and no output file. The design tests take 10.7 s in total, and 0.8 s at most for one test.

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/design
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/design. The (design) scope of the title gives the scope.
    • Priority: P2-Medium. Two real defects exist: lost diagnostics on hang and silent token corruption, but no user-facing outage.
    • Value: Medium. Prevents silent design-token data corruption and restores diagnostic output on test hangs.
    • Effort: Low. Requires adjusting one timeout value and adding a hex-to-components comparison check.
    • Related: fix(ci): give the test row and the index build own timeouts #4683, which asks for a different change. Both address CI timeout misalignment, but #4683 targets devops ci rows while the candidate targets the design-tokens job step.
  3. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Scope: scope/design. The (design) scope of the title gives the scope.
    • Priority: P2-Medium. It repairs a CI guard and a silent source check, but no user-facing failure occurs.
    • Value: Medium. It stops silent color drift and gives a diagnostic when a design test hangs.
    • Effort: Low. It changes one timeout bound and adds one small token check.
    • Related: test(roadmap): label colors are the token values of the design files #4786, which asks for a different change. Both touch the design token files and their checks. 4786 holds label colors to token values, while the candidate checks hex against components and the test bound.
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 05:27 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/designsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions