mirror of
https://github.com/beenuar/AiSOC.git
synced 2026-11-24 08:35:46 +08:00
## What
WS workstream ids (`WS4.1`, `WS7.2`, …) and brief-internal rule numbers
("rule 14") had leaked into surfaces a reader actually ships or
publishes — and nothing in the tree defined them, because they come from
an uncommitted program brief. A reader of the published OpenAPI spec,
the changelog or a module docstring hit an opaque label.
Every citation is replaced by the behaviour it referred to, and a
neutral program index now exists at
**`docs/roadmap/capability-program.md`**: a WS1–WS8 table in neutral
language ("benchmarked against a reference managed agentic-security
service"), each row linked to its merged PRs (Phase 0
[#1997](https://github.com/beenuar/AiSOC/pull/1997); WS1.1
[#1998](https://github.com/beenuar/AiSOC/pull/1998); WS7.1–7.4
[#1999](https://github.com/beenuar/AiSOC/pull/1999)–[#2002](https://github.com/beenuar/AiSOC/pull/2002);
WS4.1/4.2/4.4
[#2003](https://github.com/beenuar/AiSOC/pull/2003)–[#2005](https://github.com/beenuar/AiSOC/pull/2005)),
with in-flight workstreams marked as such.
Comments/docstrings/prose only — zero behaviour change. No test file or
symbol is renamed.
## Labels removed, per surface
| Surface | Labeled lines rewritten |
|---|---|
| `docs/openapi.yaml` (regenerated, not hand-edited) | 3 (WS4.1, WS7.4,
WS4.4) |
| `.github/workflows/integration.yml` step comments | 3 |
| `CHANGELOG.md` — Unreleased section only | 10 |
| Code, tests, scripts, migrations (`--` comments),
`docs/architecture/SYSTEM_DESIGN.md` | 85 WS lines + 4 "rule 14" lines |
"rule 14" **does exist on main** (4 sites: `case_resolution.py`,
`models/case_resolution.py`, migration 166's `--` comment,
`test_case_resolution_contract.py`) and each is rewritten as the
behaviour it names ("new enforcement is opt-in"). Rule references that
*are* defined in-tree were deliberately left: `docs/cve-patch-policy.md
rule 5`, `event_warehouse/registry.py`'s self-numbered selection rules,
and the detection title "GCP Firewall Rule 0.0.0.0/0".
Two WS namespaces turned out to be live: the gap-closure program's, and
an **older integrations program** (connectors' "WS8: bidirectional
ticketing", `base.py`'s "WS4" push capabilities, oauth/wizard "WS5").
Both are scrubbed to behaviour text; the index covers the current
program only and says so.
## Spec is regenerated, not hand-edited
The three spec hits were traced to their source docstrings (`alerts.py`
DLP-finding route, `cases.py` attention-feed route,
`business_context.py` `ManagedRulesOut` model), the docstrings
rewritten, and the spec regenerated via `scripts/export_openapi.py`. The
resulting spec diff is **exactly those three description strings** —
nothing else moved — and `scripts/export_openapi.py --check` passes
(exit 0, "docs/openapi.yaml is up to date").
The vendored twin
`services/api/app/_vendor/action_contracts/capability_contracts.py` was
regenerated through `scripts/sync_vendored_action_contracts.py` from the
actions-side edit, byte-identical.
## Gates and tests (all run pipelessly, exit codes echoed)
| Check | Result |
|---|---|
| `scripts/export_openapi.py --check` | exit 0 |
| `scripts/check_competitor_names.py` | exit 0 (15,612 files scanned;
the new index passes) |
| `scripts/check_claim_gate_matrix.py` | exit 0 (410 rows — untouched,
no tally change) |
| `scripts/readme_gates.py` | exit 0 |
| `scripts/check_mypy_baseline.py` | exit 0 ("no tree got worse") |
| `ruff format --check` + `ruff check` on all 50 touched `.py` files |
exit 0 / exit 0 |
| API test subset (14 files covering every touched api module) | 303
passed |
| Actions subset (`test_sync_detection_rule_vendor_arms`,
`test_live_action_builtins`) | 21 passed |
| Connectors subset (`test_m365_audit_dlp_toggle`,
`test_push_capabilities`) | 38 passed |
| Agents subset (`test_business_context_managed_rules`,
`test_deep_investigation`) | 47 passed, 3 pre-existing skips |
## Deliberately left in place
- **Migration `035_case_external_refs.sql:106`** — `COMMENT ON TABLE …
IS 'WS8: …'` is *executed DDL* in an applied migration, not a code
comment; rewriting it would change what a fresh install runs versus an
upgraded one. Left as the one WS string in the tree outside the index; a
future migration can retitle the table comment if wanted.
- `WIN-WS42` in two agents tests — a fixture hostname, not a label.
- A base64 integrity hash in `services/realtime/package-lock.json` that
coincidentally contains `Ws41`.
## For the close-out sweep
- **Labels arriving with in-flight PRs get a follow-up sweep at program
close-out.** Open PRs #2006–#2012 and #2014 (other lanes) will merge
more labeled text; their branches were deliberately not touched.
- `apps/web` carries "VelvetEdge spec rule 2/3/7/10" comments citing the
UI program's spec, which is also not committed anywhere — same defect
class, different program namespace, outside this PR's surfaces. Recorded
here for the close-out sweep.
## Convention (stated in the index's footer as well)
Workstream ids and rule numbers live in **PR titles only** — never in
code, specs, workflows or the changelog. Those surfaces describe the
behaviour; `docs/roadmap/capability-program.md` is the one place ids are
defined.
Co-authored-by: Beenu Arora <beenu@cyble.com>