From 0f132cea1332e7f6e80998174a30d2abb66ac3db Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 15:40:45 +0000 Subject: [PATCH] polish: PR #838 second-pass nits (non-blocking) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - calculate_cac.py: hoist 'import argparse' to module top per repo convention - smoke_scripts.py: comment the exit-1-over-exit-3 precedence - check_paths_allowlist.txt: reword the etc/passwd note ('outside repo root if resolved literally', not 'deep checkouts') - cs-scraping-architect.md: clarify both warning and error share exit 1 — parse the JSON status field for the distinction https://claude.ai/code/session_019AJddAL1NADWMXsy1qNPQF --- .../agents/cs-scraping-architect.md | 2 +- .../marketing-demand-acquisition/scripts/calculate_cac.py | 2 +- scripts/check_paths_allowlist.txt | 3 ++- scripts/smoke_scripts.py | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engineering/universal-scraping-architect/agents/cs-scraping-architect.md b/engineering/universal-scraping-architect/agents/cs-scraping-architect.md index 4709e4b4..911dd045 100644 --- a/engineering/universal-scraping-architect/agents/cs-scraping-architect.md +++ b/engineering/universal-scraping-architect/agents/cs-scraping-architect.md @@ -27,7 +27,7 @@ Data-extraction pipeline architect. Operates the `skills/universal-scraping-arch ```bash python3 skills/universal-scraping-architect/scripts/validate_extraction.py extracted_output.json --json ``` - Exit 0 = `{"status": "ok"}` → proceed. Exit 1 (`warning` = empty output, `error` = malformed JSON) → fix and re-extract; never deliver. Then check required fields and duplicates against the pipeline spec. + Exit 0 = `{"status": "ok"}` → proceed. Exit 1 → fix and re-extract; never deliver (parse the JSON `status` field for the `warning` = empty-output vs `error` = malformed-JSON distinction, since both share exit 1). Then check required fields and duplicates against the pipeline spec. 6. **Format and deliver:** CSV for tabular data, JSON for nested structures, Markdown (chunked for token limits) for crawled docs. Report row counts and empty-value summary. ## Refusal & Flag Gates diff --git a/marketing-skill/skills/marketing-demand-acquisition/scripts/calculate_cac.py b/marketing-skill/skills/marketing-demand-acquisition/scripts/calculate_cac.py index c340456a..ae708ae0 100644 --- a/marketing-skill/skills/marketing-demand-acquisition/scripts/calculate_cac.py +++ b/marketing-skill/skills/marketing-demand-acquisition/scripts/calculate_cac.py @@ -6,6 +6,7 @@ Calculate blended and channel-specific CAC for marketing campaigns. Supports multiple time periods and channel breakdowns. """ +import argparse import sys from typing import Dict, List @@ -100,7 +101,6 @@ def main(): print("Blended Target: <$300") if __name__ == "__main__": - import argparse parser = argparse.ArgumentParser( description="Calculate blended and channel-specific CAC.", formatter_class=argparse.RawDescriptionHelpFormatter, diff --git a/scripts/check_paths_allowlist.txt b/scripts/check_paths_allowlist.txt index 2f02220d..77a4ec90 100644 --- a/scripts/check_paths_allowlist.txt +++ b/scripts/check_paths_allowlist.txt @@ -33,5 +33,6 @@ engineering-team/self-improving-agent/skills/extract/SKILL.md :: docker-m1-fixes engineering-team/self-improving-agent/skills/extract/SKILL.md :: api-client-regen/SKILL.md # Path-traversal attack payload in a pen-testing teaching table, not a real -# file reference. Resolves to the host /etc/passwd only on deep checkouts. +# file reference. Would point outside the repo root if resolved literally; +# allowlisted as a teaching example, not an actual file. engineering-team/skills/security-pen-testing/SKILL.md :: ../../../etc/passwd diff --git a/scripts/smoke_scripts.py b/scripts/smoke_scripts.py index 0aa7fd54..ab8c77f2 100644 --- a/scripts/smoke_scripts.py +++ b/scripts/smoke_scripts.py @@ -158,6 +158,8 @@ def main(argv=None): if failures: return 1 + # Only reached when no --help failures; a real failure (exit 1) takes + # precedence over allowlist hygiene (exit 3). if stale_exceptions: return 3 return 0