Skip to content

fix: production-level hardening — bug fix, tests, and CI#902

Merged
blackboxprogramming merged 6 commits into
mainfrom
copilot/get-production-level
Mar 9, 2026
Merged

fix: production-level hardening — bug fix, tests, and CI#902
blackboxprogramming merged 6 commits into
mainfrom
copilot/get-production-level

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

pipeline.py crashed at runtime with a NameError and had zero test coverage. CI was running a no-op smoke test that never caught regressions.

Changes

  • Bug fixBRAND[gradient]BRAND["gradient"] in pipeline.py:export_tokens(); the bare name gradient was never defined, crashing every pipeline run
  • Tests — 21 pytest tests across tests/test_pipeline.py and tests/test_theme_generator.py covering SVG rendering, token export (CSS/JSON/Tailwind), brand palette correctness, forbidden color enforcement, and golden-ratio gradient stops
  • CI — replaced the || true smoke test in ci.yml with python -m pytest tests/ -v
  • README — added 🟢 GREEN LIGHT status badge per the BlackRoad Traffic Light System
  • .gitignore — added **/__pycache__/ and *.pyc
# Before — crashes every time export_tokens() is called
css += f"  --gradient-brand: {BRAND[gradient]};\n"  # NameError: name 'gradient' is not defined

# After
css += f"  --gradient-brand: {BRAND['gradient']};\n"
Original prompt

Get it production level please


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 3, 2026 11:11
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare application for production deployment fix: production-level hardening — bug fix, tests, and CI Mar 3, 2026
@blackboxprogramming blackboxprogramming marked this pull request as ready for review March 3, 2026 18:40
Copilot AI review requested due to automatic review settings March 3, 2026 18:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the studio tooling by fixing a runtime crash in the asset pipeline, adding pytest coverage for token/theme generation, and making CI execute the test suite so regressions are caught.

Changes:

  • Fix export_tokens() runtime NameError by correctly indexing BRAND["gradient"].
  • Add pytest coverage for pipeline.py and theme_generator.py outputs (CSS/JSON/Tailwind, gradients, forbidden colors).
  • Update CI workflow to run pytest (and install test/lint dependencies).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/pipeline.py Fixes export_tokens() crash by correctly referencing the gradient token.
tests/test_pipeline.py Adds tests for SVG rendering + token export behavior.
tests/test_theme_generator.py Adds tests validating CSS/JSON/Tailwind token generation and brand rules.
.github/workflows/ci.yml Runs pytest in CI and installs pytest/flake8.
README.md Adds Traffic Light status section at the top.
.gitignore Ignores Python bytecode and __pycache__ directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment thread tests/test_pipeline.py Outdated
Comment thread tests/test_theme_generator.py Outdated
blackboxprogramming and others added 3 commits March 4, 2026 15:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@blackboxprogramming blackboxprogramming merged commit 40cd7dc into main Mar 9, 2026
9 of 10 checks passed
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.

3 participants