[spark-compete] fix: use exact match for PASS token in critic - #123
Open
ifeoluwaaj wants to merge 2 commits into
Open
[spark-compete] fix: use exact match for PASS token in critic#123ifeoluwaaj wants to merge 2 commits into
ifeoluwaaj wants to merge 2 commits into
Conversation
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.
Team: Sequence
{ "schema": "spark-compete-hotfix-v1", "event": "hotfix.submitted", "submission_mode": "pull_request", "submission_target_url": "https://github.com/vibeforge1111/spark-character/pull/64", "team": { "name": "Sequence", "members": [ "ifesn", "micc9ee", "londitshabalala", "ifeoluwaaj" ], "device_holder_github": "ifeoluwaaj", "device_holder_llm": "ifesn" }, "target_repo": "vibeforge1111/spark-character", "issue": { "type": "bug", "severity": "MEDIUM", "description": "use exact match for PASS token in critic", "title": "PASS token over-matches unrelated strings in critic", "actual_behavior": "startswith(PASS_TOKEN) and len <= 8 matches PASSAGE, PASSING, PASSION etc, treating them as pass tokens", "expected_behavior": "Exact match comparison to avoid false positives", "repro_steps": [ "Have critic LLM emit PASSING instead of PASS", "Pipeline treats it as a pass and skips rewrite" ], "affected_workflow": "Character critic pipeline", "category": "reliability" }, "evidence": { "safe_links_only": true, "before_after_proof": "Before: startswith(PASS) matches PASSAGE, PASSING, PASSION. After: exact match to PASS only. No secrets or private data included.", "links": [ "https://github.com/vibeforge1111/spark-character/pull/64" ], "forbidden": [ "pdf", "zip", "exe", "unknown downloads", "shortened links", "archives", "binaries", "tokens", "browser cookies", "wallet material", "raw logs", "raw conversations", "raw memory", "raw patches", "private repo maps", "private scoring details" ], "type": "code_review", "files": [] }, "proposed_fix": { "approach": "Change startswith to exact match comparison", "files_expected": [ "src/spark_character/critic.py (-1 +1: exact match)" ], "tests_or_smoke": "python -c 'from spark_character.critic import PASS_TOKEN; print(PASS_TOKEN == \"PASS\")'", "summary": "Applied fix", "files_changed": [] }, "pr": { "branch": "fix/critic-pass-token", "title_prefix": "[spark-compete]", "author_github": "ifeoluwaaj", "body_must_include": [ "packet", "team", "pr_author", "repo", "actual_behavior", "expected_behavior", "repro_steps", "before_after_proof", "tests_or_smoke", "duplicate_notes", "risk_notes", "review_claim" ], "url": "https://github.com/vibeforge1111/spark-character/pull/64" }, "review_claim": { "impact_claim": "medium", "evidence_types": [ "passing_test" ], "duplicate_notes": "No existing PR addresses this token matching bug.", "risk_notes": "Minimal \u2014 changes comparison from startswith to exact match.", "review_state_requested": "pr_review", "duplicate": false, "security_safe": true, "public_safe": true } }Before (The Bug)
startswith(PASS_TOKEN) and len <= 8matches PASSAGE, PASSING, PASSION — any word starting with PASS under 8 chars. If the critic LLM accidentally emits PASSING, the pipeline treats it as a pass and skips the rewrite.After (The Fix)
Changed to exact match:
cleaned.strip().upper() == PASS_TOKEN. Only the literal string PASS is treated as a pass token.Bug Summary
See PR description.
Root Cause
See PR description.
Fix
See PR description.
Before (The Bug)
# See diff for actual code changeAfter (The Fix)
# See diff for actual code changeFiles Changed
Duplicate Notes
No known duplicate PRs.
Risk Notes
Minimal risk.