fix: production-level hardening — bug fix, tests, and CI#902
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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()runtimeNameErrorby correctly indexingBRAND["gradient"]. - Add pytest coverage for
pipeline.pyandtheme_generator.pyoutputs (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.
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
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pipeline.pycrashed at runtime with aNameErrorand had zero test coverage. CI was running a no-op smoke test that never caught regressions.Changes
BRAND[gradient]→BRAND["gradient"]inpipeline.py:export_tokens(); the bare namegradientwas never defined, crashing every pipeline runtests/test_pipeline.pyandtests/test_theme_generator.pycovering SVG rendering, token export (CSS/JSON/Tailwind), brand palette correctness, forbidden color enforcement, and golden-ratio gradient stops|| truesmoke test inci.ymlwithpython -m pytest tests/ -v.gitignore— added**/__pycache__/and*.pycOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.