Skip to content

yaml: cover the dialects yaml.py actually targets (1/32 → 31/32 rules); fix survey_pool.py against the split standards package - #25

Merged
squid-protocol merged 2 commits into
mainfrom
feature/yaml-coverage
Sep 4, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feature/yaml-coverage

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

⚠️ Quarantine Protocol

  • Zero execution — additions are .yml/.yaml source + upstream LICENSE files only. No build steps.
  • Pure structure — every folder targets specific parser detection rules (below).
  • No malicious payloads.
  • Permission bits — new files carry none. (The pre-existing data/yaml/ansible/ files carry exec bits from before this convention; left untouched here.)

Why

Issue #23: the yaml category was 8 Ansible task files, and 31 of 32 non-None yaml rules never fired through the real Prism/StructuralExtractor pipeline — crucible-audit validated nothing for the language. yaml.py's own _meta.target_version is "YAML CI/CD (GitHub Actions / GitLab CI)" and its discriminators name .github/workflows, docker-compose.yml and openapi.yaml — an ecosystem mismatch, not a volume one. This fills the category with those dialects from the pool.

Measured at gitgalaxy main (a3348390, includes the #2681 ownership/cleanup rules): 1/32 (3.1%) → 31/32 (96.9%) — the highest per-language rule coverage in the corpus (previous best: php, 94%). The one dead rule, hardcoded_secrets, is a deliberate negative: it matches committed 16+-char quoted secret values, which real upstreams don't have.

data/yaml/ — 1 → 7 folders, 8 → 51 files

Folder Boundary it tests Source (license)
moby_workflows (16) Container-engine CI — 26/32 rules alone: docker stop/rm teardown in run: (cleanup, gitgalaxy#2647), 40-hex SHA-pinned uses: (immutability_locks), ::error/::warning (telemetry), matrix + concurrency: moby/moby (Apache 2.0)
vscode_workflows (13) The messy edges: commented-out # run:/# uses: steps (dead_code), curl | bash + continue-on-error: true (safety_bypasses), sleep N (thread_sleeps), cron schedule: microsoft/vscode (MIT)
serenity_composite_actions (3) Composite action.yml with top-level author: (ownership, gitgalaxy#2646), inputs:/with: (args) SerenityOS/serenity (BSD 2-Clause)
black_action (1) Root-level published/marketplace action: author:, branding:, branching run: block psf/black (MIT)
grafana_compose (3) Compose dialect (a yaml.py discriminator): image: service graphs, $VAR interpolation, and a literal webhook: service key — the only real pool file that fires listeners grafana/grafana (AGPL v3)
sqlmap_openapi (1) OpenAPI 3.0 spec dialect (openapi.yaml discriminator): info:/paths: topology, dense description: surface sqlmapproject/sqlmap (GPL v2)

Pool ceiling (recorded in data/yaml/SOURCES.md): no OpenAPI spec in the pool under the 60 KB cap carries an info.contact: block (the two that do are 188 KB and 456 KB), so ownership's contact: alternation is exercised only via author:. No synthetic files were added.

Source & License

All 6 new folders were copied directly from clones in the gitgalaxy/data pool at a pinned HEAD (all true upstreams — no squid-protocol forks), recorded exact in EXACT_PROVENANCE (tools/independent_data_auditor.py) — full table in data/yaml/SOURCES.md. Licenses: Apache 2.0, MIT ×2, BSD 2-Clause, AGPL v3, GPL v2.

  • data/yaml/SOURCES.md rows added: yes; root SOURCES.md updated (yaml row: 1 folder/8 files → 7 folders/51 files).

Provenance regen

data/PROVENANCE.json regenerated with python3 tools/independent_data_auditor.py data --provenance (run twice, stable). Only the six new yaml rows changed; no unrelated drift.

Also in this PR: survey_pool.py fix (issue #24, first commit)

gitgalaxy#2527 split language_standards.py into a per-language package, so survey_pool.py died with IsADirectoryError before step 1 of every expansion. It now imports LANGUAGE_DEFINITIONS from the package (mining markers from the compiled rules' .pattern strings) and keeps the old source-slicing path for a pre-split single-file checkout. Also fixes AGPL/LGPL license misclassification in both skill tools (grafana classified as "GNU GPL v3.0"; after a naive reorder, sqlmap's GPLv2 classified as LGPL — signatures are now anchored to license title blocks).

Issue #24's other blocker (stale RELEASING.md v1.2.0 prose) was already fixed on main by #20; nothing to do.

Golden master

Not touched. Regenerating gitgalaxy's golden_master_* fixtures and bumping the LANGUAGE_CRUCIBLE_REF pin is the separate coordinated step in RELEASING.md, for when this lands and a tag is cut. Note for that step: the new yaml files will substantially change the golden masters' yaml group (that's the point — see #23).

Fixes #23. Closes #24.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WzZfe7JJQK7KHPRmi2cBdz

squid-protocol and others added 2 commits September 3, 2026 21:19
…/LGPL license misclassification

- survey_pool.py's parse_standard read language_standards.py as a single
  file, but gitgalaxy#2527 split it into a per-language package, so every
  run died with IsADirectoryError before printing a language's markers
  (issue #24, blocker 2). GITGALAXY_STANDARDS (or the unchanged default
  path) now resolves to the package and imports LANGUAGE_DEFINITIONS
  directly -- extensions/exact_matches/shebangs/rules come from the
  registry, and markers are mined from the compiled rules' .pattern
  strings. A genuinely single-file (pre-split) checkout still takes the
  old key-to-next-key slicing path.
- In registry mode the shared GLOBAL_*_DEBT alternations are skipped when
  mining markers: the pre-split miner never saw them (bare name
  references), and their multilingual TODO/FIXME tokens are generic
  comment vocabulary, not dialect markers.
- Both tools classified AGPL-3.0 texts as "GNU GPL v3.0" (observed on
  grafana): the plain-GPL signatures matched the AGPL/LGPL title lines
  first. AGPL/LGPL now come first, anchored to the title block's
  "...LICENSE / Version N" shape so the prose mention of the Lesser GPL in
  every plain GPL preamble can't claim it either (observed on sqlmap's
  GPLv2 COPYING).

Refs #24, squid-protocol/gitgalaxy#2527.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzZfe7JJQK7KHPRmi2cBdz
…s (1/32 -> 31/32 rules)

The yaml category was 8 Ansible task files: 31 of 32 non-None yaml rules
never fired, so the golden master validated nothing for the language
(issue #23). yaml.py targets GitHub Actions / OpenAPI / compose; this
adds those ecosystems from the pool, all exact provenance:

- moby_workflows (16+L, Apache 2.0): container-engine CI; docker
  stop/rm teardown (cleanup, gitgalaxy#2647), SHA-pinned uses:
  (immutability_locks), ::error/::warning (telemetry). 26/32 alone.
- vscode_workflows (13+L, MIT): commented-out steps (dead_code),
  curl|bash + continue-on-error: true (safety_bypasses), sleep waits
  (thread_sleeps), cron schedules.
- serenity_composite_actions (3+L, BSD-2): composite action.yml with
  top-level author: (ownership, gitgalaxy#2646), inputs:/with:.
- black_action (1+L, MIT): root-level published action, author:.
- grafana_compose (3+L, AGPL-3.0): compose dialect; webhook: service
  key -- the only real pool file that fires listeners.
- sqlmap_openapi (1+L, GPL-2.0): OpenAPI 3.0 spec dialect.

Measured through the real Prism/StructuralExtractor pipeline at
gitgalaxy main (a3348390): category coverage 1/32 (3.1%) -> 31/32
(96.9%), the highest of any language in the corpus. hardcoded_secrets
stays a deliberate negative (real upstreams don't commit 16+-char
quoted secrets). Pool ceiling recorded in data/yaml/SOURCES.md: no
sub-60KB OpenAPI spec in the pool has an info.contact: block, so
ownership's contact: alternation is exercised via author: only.

PROVENANCE.json regenerated with the auditor (run twice, stable); only
the six new rows changed. Golden master not touched -- separate step
per RELEASING.md.

Fixes #23. Closes #24.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzZfe7JJQK7KHPRmi2cBdz
@squid-protocol
squid-protocol merged commit 84e92da into main Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant