feat: cast validate, template sync, yamllint CI, TTY fix#9
Merged
shenxianpeng merged 4 commits intomainfrom Apr 9, 2026
Merged
feat: cast validate, template sync, yamllint CI, TTY fix#9shenxianpeng merged 4 commits intomainfrom
shenxianpeng merged 4 commits intomainfrom
Conversation
… add yamllint CI step Agent-Logs-Url: https://github.com/castops/cast-cli/sessions/dfdca0f4-010e-4d5f-9ac9-f94e60c1db3f Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/castops/cast-cli/sessions/dfdca0f4-010e-4d5f-9ac9-f94e60c1db3f Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review project for alignment with goals
feat: cast validate, template sync, yamllint CI, TTY fix
Apr 9, 2026
shenxianpeng
approved these changes
Apr 9, 2026
Member
|
@copilot fix ci failure |
…es only Agent-Logs-Url: https://github.com/castops/cast-cli/sessions/b9dae834-8b84-407d-8efe-435a5c426f98 Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Contributor
Author
Fixed in a5952c5. Two failures:
|
shenxianpeng
approved these changes
Apr 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.
Four gaps identified during project review — one unimplemented "本期实施" feature, one spec deviation, one silent drift risk, and one missing CI gate.
cast validate(new command)Validates a SARIF 2.1.0 file locally and previews cast-gate blocking behavior — no OPA/conftest dependency. Gate logic mirrors
policy/*.regoin pure Python.Exit codes:
0valid + allowed ·1format error ·2valid + blockedTemplate drift fix + sync guard
templates/(curl-download copies) had diverged fromsrc/cast_cli/templates/(embedded CLI copies) across all 6 stack templates — Rego policy was injected via env-var+printfin canonical vs heredoc in embedded. Synced canonical to match embedded (heredoc is more reliable).scripts/check-template-sync.sh: diffs alldevsecops.ymlpairs, exits 1 on any mismatch.yamllint CI job
New
template-lintjob indevsecops.ymlrunsyamllint -d relaxedover all template YAML files. Template syntax errors now fail CI instead of reaching users.TTY detection fix
cast initusedsys.stdout.isatty()to gate the interactive type-selection menu. Changed tosys.stdin.isatty()— stdin is the correct signal for "can I prompt the user for input."