$npx -y skills add HLND2T/CS2_VibeSignatures --skill post-change-validationRun the repository's C++ post-change validation gate against an immutable candidate snapshot before publication. Use when a project workflow explicitly requests final C++ validation after formatting and gamedata updates. Any failed, skipped, or non-runnable validation stops the c
| 1 | # Post-Change Validation |
| 2 | |
| 3 | Run `run_cpp_tests.py` as a hard pre-commit gate. This skill never edits tracked files or candidate bytes, repairs |
| 4 | failures, publishes a snapshot, stages changes, or commits. It may only advance the untracked candidate session after |
| 5 | successful validation. |
| 6 | |
| 7 | ## Inputs |
| 8 | |
| 9 | - `gamever` — use the caller-provided value. If omitted, read `CS2VIBE_GAMEVER` from `.env`. |
| 10 | - `candidate` — required candidate snapshot path produced by `/post-change-update phase=before-validation`. |
| 11 | - `session` — required session manifest path paired with that candidate. |
| 12 | |
| 13 | If no non-empty game version is available, stop immediately: |
| 14 | |
| 15 | ```text |
| 16 | <skill_error>post-change-validation cannot run: gamever was not provided and .env has no CS2VIBE_GAMEVER.</skill_error> |
| 17 | ``` |
| 18 | |
| 19 | After resolving the game version, set `ANALYSIS_CONFIG="configs/$GAMEVER.yaml"`. If it is not a file, stop without |
| 20 | falling back to another game version: |
| 21 | |
| 22 | ```text |
| 23 | <skill_error>post-change-validation cannot run: analysis config is missing for GAMEVER.</skill_error> |
| 24 | ``` |
| 25 | |
| 26 | If either candidate path is absent, stop without falling back to `bin` or the tracked snapshot: |
| 27 | |
| 28 | ```text |
| 29 | <skill_error>post-change-validation cannot run: candidate and session are required.</skill_error> |
| 30 | ``` |
| 31 | |
| 32 | ## Method |
| 33 | |
| 34 | ### Step 1 — Run the C++ validation and retain the full log |
| 35 | |
| 36 | Use the resolved game version explicitly: |
| 37 | |
| 38 | ```bash |
| 39 | LOG_FILE="/tmp/post-change-validation-${GAMEVER}.log" |
| 40 | set -o pipefail |
| 41 | uv run gamesymbol_candidate.py guard -candidate "$CANDIDATE" -session "$CANDIDATE_SESSION" |
| 42 | uv run run_cpp_tests.py -gamever "$GAMEVER" -configyaml "$ANALYSIS_CONFIG" -snapshot "$CANDIDATE" -debug 2>&1 | tee "$LOG_FILE" |
| 43 | STATUS=${PIPESTATUS[0]} |
| 44 | ``` |
| 45 | |
| 46 | Do not hide or normalize the exit code. Preserve the complete log so compile diagnostics and layout differences |
| 47 | can be reported verbatim. |
| 48 | |
| 49 | ### Step 2 — Require evidence that tests actually ran |
| 50 | |
| 51 | Validation succeeds only when all of the following are true: |
| 52 | |
| 53 | - `STATUS` is `0`. |
| 54 | - The log contains both `=== running cpp_tests ===` and `=== done ===`. |
| 55 | - The final counters report zero compile failures, invalid test items, and layout differences. |
| 56 | - The log does not contain `No cpp_tests defined`, `No target triples found`, or |
| 57 | `No runnable tests for current clang++ environment.` |
| 58 | |
| 59 | An exit code of zero without runnable tests is not a successful validation; treat it as blocked and stop. |
| 60 | |
| 61 | ### Step 3 — Stop and report any failure |
| 62 | |
| 63 | On any failed or non-runnable result, inspect the full log and report: |
| 64 | |
| 65 | - game version and process exit code; |
| 66 | - every failing test name; |
| 67 | - whether the cause was compilation, invalid configuration, vtable/record layout differences, or an unusable |
| 68 | clang environment; |
| 69 | - the relevant compiler diagnostic or layout-difference lines; |
| 70 | - the full log path. |
| 71 | |
| 72 | Use this form: |
| 73 | |
| 74 | ```text |
| 75 | <skill_error>post-change-validation failed for gamever GAMEVER: FAILURE_REASON. Full log: LOG_FILE</skill_error> |
| 76 | ``` |
| 77 | |
| 78 | Then **STOP the entire calling task**. Do not attempt a fix or retry, do not invoke |
| 79 | `/post-change-update phase=after-validation`, and do not enter any commit step. |
| 80 | |
| 81 | ### Step 4 — Report success |
| 82 | |
| 83 | When the gate passes, guard the candidate again and record the successful C++ step: |
| 84 | |
| 85 | ```bash |
| 86 | uv run gamesymbol_candidate.py guard -candidate "$CANDIDATE" -session "$CANDIDATE_SESSION" |
| 87 | uv run gamesymbol_candidate.py mark -candidate "$CANDIDATE" -session "$CANDIDATE_SESSION" -step cpp_tests |
| 88 | ``` |
| 89 | |
| 90 | Report the game version, candidate SHA-256, and zero-valued failure counters. The caller may then invoke |
| 91 | `/post-change-update phase=after-validation` with the same game version, candidate, and session. |