fix: correct SEARCH_TITLE quoting and unsafe conditions in default-workflow#4207
fix: correct SEARCH_TITLE quoting and unsafe conditions in default-workflow#4207
Conversation
…default-workflow - Fix SEARCH_TITLE 3-char bash replacement bug (#4206): change 3-char replacement (produces ''') to 2-char SQL-safe replacement ('') - Fix 4 parser-unsafe 'not in [...]' conditions in step-07, step-08, step-08b, checkpoint-after-implementation: rewrite to != / and conjunctions - Add test_step03_bash_quoting.py: 13 regression tests for SEARCH_TITLE escaping, ISSUE_TITLE normalisation, heredoc injection safety, ADO WIQL safety - Add test_default_workflow_no_unsafe_conditions.py: 15 tests covering no-unsafe-conditions invariant, semantic equivalence, and YAML validity All 28 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expand test_step03_bash_quoting.py with three new test classes: TestGitHubSearchPath (3 tests): - Verify GitHub path uses double-quoted --search "$SEARCH_QUERY" - Verify SEARCH_QUERY has no SQL single-quote escaping (gh CLI differs from WIQL) - Verify SEARCH_QUERY is set from ISSUE_TITLE:0:100 only (truncation, no escaping) TestSearchTitleExactPattern (2 tests): - Byte-level exact literal check for the correct 2-char replacement pattern - Byte-level exact literal check confirming buggy 3-char pattern is absent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… parse in TestYamlValidity - test_step03_bash_quoting: move 'import os' from inside function body to module-level imports (avoids repeated module lookup per test invocation) - test_default_workflow_no_unsafe_conditions: TestYamlValidity.test_recipe_yaml_is_valid now accepts the module-scoped 'recipe' fixture instead of calling _load_recipe() directly, eliminating a redundant yaml.safe_load() of the 2675-line recipe file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Automatic checkpoint to preserve review-addressed changes. Saved before running pre-commit hooks and tests.
Repo Guardian - PassedAll 3 changed files are durable project artifacts. No ephemeral content detected.
No violations found. This PR is clear to merge from a repository hygiene perspective.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repo Guardian - PassedAll 5 changed files are durable project artifacts. No ephemeral content detected.
No violations found. This PR is clear to merge from a repository hygiene perspective.
|
Remove accidental `.claude/context/PROJECT.md` and `.secrets.baseline` changes introduced by the adaptive workflow run so PR #4207 contains only the intended recipe and regression-test fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repo Guardian - PassedAll 3 changed files are durable project artifacts. No ephemeral content detected.
No violations found. This PR is clear to merge from a repository hygiene perspective.
|
Refresh the Layer 2 atlas page after the new recipe regression tests changed AST binding totals, so PR #4207 carries the required atlas artifact update for the staleness gate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repo Guardian - PassedAll 4 changed files are durable project artifacts. No ephemeral content detected.
No violations found. This PR is clear to merge from a repository hygiene perspective.
|
Add a real gadugi scenario for the default-workflow quoting and condition fixes so merge-ready evidence uses validate/run output instead of hand-wavy claims. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repo Guardian - PassedAll 5 changed files are durable project artifacts. No ephemeral content detected.
No violations found. This PR is clear to merge from a repository hygiene perspective.
|
PR Triage ReportRisk: Low | Priority: High | Verdict: Needs Review | CI: All green SummaryTargeted fix for broken SEARCH_TITLE quoting and unsafe Scope Assessment
Risk Factors
CI StatusAll checks passed: Validate Code, Check Version Bump, MkDocs Navigation, Documentation Policy, Link Validation (Local), Code Examples, GitGuardian Security — all green. RecommendationLow-risk, high-priority. Fixes real behavioral issues (broken WIQL search titles causing ADO failures, unsafe
|
|
Superseded by PRs #4367-4370 (merged) which fixed SEARCH_TITLE quoting and conditions in default-workflow. |
Fixes #4206 — adaptive smart-orchestrator/default-workflow failed due to broken SEARCH_TITLE quoting and unsafe
not in [...]conditions.Changes
SEARCH_TITLEsingle-quote escaping instep-03-create-issue:'''->''for WIQL-safe ADO search titlesnot in [...]conditions to explicit!= ... and ... != ...checkstests/recipes/test_step03_bash_quoting.pytests/recipes/test_default_workflow_no_unsafe_conditions.pytests/gadugi/pr-4207-default-workflow-quoting-and-conditions.yamldocs/atlas/ast-lsp-bindings/index.mdMerge readiness
QA-team evidence
tests/gadugi/pr-4207-default-workflow-quoting-and-conditions.yamlnpx gadugi-test validate -f tests/gadugi/pr-4207-default-workflow-quoting-and-conditions.yamlnpx gadugi-test run -d tests/gadugi -s pr-4207-default-workflow-quoting-and-conditionsoutputs/sessions/session_9538752d-6c59-490a-9ffd-e262f50f57d3_2026-04-03T15-52-14-686Z.json(1 passed, 0 failed)Documentation
docs/atlas/ast-lsp-bindings/index.mdn/aQuality-audit
grep -c 'not in ['produced a false-positive pass path); replaced it with a literal Python count and reran gadugi validate/runSEARCH_TITLEassignment and asserts doubled quotespr4207-clean-a,pr4207-clean-b,pr4207-clean-c) reported no medium/high/critical findingsCI
gh pr checks 4207Atlas Staleness Gate,Scheduled Full Atlas Rebuild,Invisible Character Scan/scan,Bot Detection/activation,Bot Detection/agent,Bot Detection/conclusion,Bot Detection/safe_outputs(normal skipped jobs for this PR)Scope
amplifier-bundle/recipes/default-workflow.yaml,docs/atlas/ast-lsp-bindings/index.md,tests/gadugi/pr-4207-default-workflow-quoting-and-conditions.yaml,tests/recipes/test_default_workflow_no_unsafe_conditions.py,tests/recipes/test_step03_bash_quoting.pyVerdict