feat(qg0): configurable QG-0 title limit via ORCH_QG0_TITLE_MAX (ORCH-069) #74

Open
admin wants to merge 1 commits from feature/ORCH-069-qg-0-title-orch-qg0-title-max- into main
Owner

Summary

  • ORCH-069: replace the hardcoded len(name) > 80 cap in the QG-0 entry validation (_qg0_errors, src/webhooks/plane.py) with a configurable Settings.qg0_title_max (env ORCH_QG0_TITLE_MAX, default 200). The 80-char cap was a hygiene limit, not structural (slug is cut [:30] independently, tasks.title TEXT is unbounded), so valid 81-200 char titles were rejected without a business reason. The limit is read dynamically per call; the error text interpolates the active value.
  • Graceful degradation (AC-3, self-hosting safety): an empty/non-numeric ORCH_QG0_TITLE_MAX no longer crashes the process on startup. A field_validator(mode="before") in src/config.py intercepts the raw env before pydantic's int-parse and falls back to 200 (never raises), suppressing ValidationError.
  • Additive & backward-compatible (default 200 > old 80, every previously-passing title still passes, AC-7).

Invariants unchanged

STAGE_TRANSITIONS, QG_CHECKS registry (QG-0 is inline entry validation, not a registered stage-gate), DB schema, slug [:30], lower limits (<5 title, <20 description), soft-QG-0 warning path, API.

Docs (golden source, same PR)

  • .env.example, .env.staging.example add ORCH_QG0_TITLE_MAX=200 with comment.
  • CHANGELOG.md ORCH-069 entry.
  • No central env config table in README/CLAUDE.md, so nothing else to update (AC-6 conditional).
  • ADR: docs/work-items/ORCH-069/06-adr/ADR-001-configurable-qg0-title-limit.md.

Test plan

  • tests/test_qg0_title_limit.py 10 unit tests (TC-01..TC-10): boundaries 200/201 (AC-1), configurable 120/121 (AC-2), graceful invalid/empty/valid env (AC-3), lower limits intact (AC-4), backward-compat (AC-7).
  • python -m pytest tests/ -q all green (757 passed).

Refs: ORCH-069

🤖 Generated with Claude Code

## Summary - **ORCH-069**: replace the hardcoded `len(name) > 80` cap in the QG-0 entry validation (`_qg0_errors`, `src/webhooks/plane.py`) with a configurable `Settings.qg0_title_max` (env `ORCH_QG0_TITLE_MAX`, default **200**). The 80-char cap was a hygiene limit, not structural (slug is cut `[:30]` independently, `tasks.title TEXT` is unbounded), so valid 81-200 char titles were rejected without a business reason. The limit is read dynamically per call; the error text interpolates the active value. - **Graceful degradation (AC-3, self-hosting safety)**: an empty/non-numeric `ORCH_QG0_TITLE_MAX` no longer crashes the process on startup. A `field_validator(mode="before")` in `src/config.py` intercepts the raw env before pydantic's `int`-parse and falls back to 200 (never raises), suppressing `ValidationError`. - Additive & backward-compatible (default 200 > old 80, every previously-passing title still passes, AC-7). ## Invariants unchanged `STAGE_TRANSITIONS`, `QG_CHECKS` registry (QG-0 is inline entry validation, not a registered stage-gate), DB schema, slug `[:30]`, lower limits (`<5` title, `<20` description), soft-QG-0 warning path, API. ## Docs (golden source, same PR) - `.env.example`, `.env.staging.example` add `ORCH_QG0_TITLE_MAX=200` with comment. - `CHANGELOG.md` ORCH-069 entry. - No central env config table in README/CLAUDE.md, so nothing else to update (AC-6 conditional). - ADR: `docs/work-items/ORCH-069/06-adr/ADR-001-configurable-qg0-title-limit.md`. ## Test plan - [x] `tests/test_qg0_title_limit.py` 10 unit tests (TC-01..TC-10): boundaries 200/201 (AC-1), configurable 120/121 (AC-2), graceful invalid/empty/valid env (AC-3), lower limits intact (AC-4), backward-compat (AC-7). - [x] `python -m pytest tests/ -q` all green (757 passed). Refs: ORCH-069 🤖 Generated with [Claude Code](https://claude.com/claude-code)
admin added 8 commits 2026-06-08 14:24:56 +03:00
Replace the hardcoded `len(name) > 80` cap in the QG-0 entry validation
(_qg0_errors) with a configurable Settings.qg0_title_max (env
ORCH_QG0_TITLE_MAX, default 200). The 80-char cap was a hygiene limit, not
structural, so valid 81-200 char titles were rejected without a business
reason. The limit is read dynamically per call and the error text interpolates
the active value.

Graceful degradation (AC-3, self-hosting safety): an empty/non-numeric env
value no longer crashes the process on startup. A field_validator(mode="before")
intercepts the raw env before int-parsing and falls back to 200 (never raises),
suppressing pydantic ValidationError.

Additive and backward-compatible (default 200 > old 80). Invariants unchanged:
STAGE_TRANSITIONS, QG_CHECKS registry, DB schema, slug [:30], lower limits,
soft-QG-0 warning path, API.

Refs: ORCH-069

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reviewer P1 fix (attempt 2/3): новый параметр отсутствовал в таблице
«Все переменные с префиксом ORCH_», делая её неконсистентной заголовку.
Закрывает AC-6 / ТЗ §9.

Refs: ORCH-069
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
tester(ET): auto-commit from tester run_id=374
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Successful in 21s
18f887c886
admin force-pushed feature/ORCH-069-qg-0-title-orch-qg0-title-max- from 87a91a08ec to 18f887c886 2026-06-08 14:24:56 +03:00 Compare
admin added 1 commit 2026-06-08 14:25:11 +03:00
developer(ET): auto-commit from developer run_id=376
All checks were successful
CI / test (push) Successful in 20s
CI / test (pull_request) Successful in 20s
2e84813c13
admin added 1 commit 2026-06-08 14:28:19 +03:00
reviewer(ET): auto-commit from reviewer run_id=377
All checks were successful
CI / test (push) Successful in 20s
CI / test (pull_request) Successful in 22s
e1055861b5
admin added 1 commit 2026-06-08 14:30:18 +03:00
tester(ET): auto-commit from tester run_id=378
All checks were successful
CI / test (push) Successful in 20s
CI / test (pull_request) Successful in 20s
de70ee811d
admin added 1 commit 2026-06-08 14:44:39 +03:00
deploy(ORCH-036): finalize SUCCESS for ORCH-069
All checks were successful
CI / test (push) Successful in 23s
CI / test (pull_request) Successful in 20s
d33e0ded2e
admin added 1 commit 2026-06-08 14:59:45 +03:00
docs(ORCH-021): post-deploy HEALTHY/NONE for ORCH-069
All checks were successful
CI / test (push) Successful in 20s
CI / test (pull_request) Successful in 20s
af099f98e2
All checks were successful
CI / test (push) Successful in 20s
CI / test (pull_request) Successful in 20s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/ORCH-069-qg-0-title-orch-qg0-title-max-:feature/ORCH-069-qg-0-title-orch-qg0-title-max-
git checkout feature/ORCH-069-qg-0-title-orch-qg0-title-max-
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/orchestrator#74