Repository navigation
Description
Wave 1 · theme D1-8: Docs describing features that do not exist (doc side of code findings) · highest severity High · 1 finding(s) · effort trivial
Summary
A log aggregator built on cicd.md:153 receives no events, and a script testing .verdict == "success" never matches.
Primary finding
CR-A04-008 — cicd.md 'JSON output mode' section documents a non-existent .verdict key and JSON log events on stdout
severity High · reachability default · intent contract-violation · confidence confirmed · independently confirmed · reproduced end to end
What happens. cicd.md:149-150 shows forgelm --config ... --output-format json | jq '.verdict' printing "success", but the training envelope has no 'verdict' key (forgelm/cli/_result.py:11-20), so jq prints null (after the stdout pollution above). cicd.md:153 says every event logged to stderr is also emitted as a JSON object on stdout. In fact _setup_logging in JSON mode only raises the level to WARNING (forgelm/cli/_logging.py:25-33) and logs remain plain text on stderr.
Where.
docs/usermanuals/en/operations/cicd.md:148-153forgelm/cli/_result.py:9-105forgelm/cli/_logging.py:21-38docs/usermanuals/tr/operations/cicd.md:150forgelm/cli/_result.py:113-128forgelm/cli/_dispatch.py:238-240forgelm/cli/_training.py:154
Evidence.
- Training envelope keys observed: success, metrics, final_model_path, reverted, awaiting_approval, run_id, config_hash, resource_usage, estimated_cost_usd (ot2.log / clean.out).
Recommended fix. Replace with jq '.success' and remove the stdout event-stream claim (EN+TR).
Acceptance criteria
- A regression test reproduces the failure scenario and asserts the corrected behaviour.
- Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
- Every finding in this issue is resolved or explicitly closed with a reason.
Found by the October 2026 ForgeLM code and documentation review against commit cab2947. Code links point at that commit; line numbers may have moved since. Finding IDs (CR-…, DOC-…, TECH-…) are stable references for this backlog.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
cemililik commentedon Oct 22, 2026
Where to start
Thanks for taking a look. Claim it by starting a comment with
/assignso nobody duplicates the work.This section has two errors, and #216 reports the first of them on the same lines. One pull request fixes both issues; put
Fixes #433andFixes #216in its description.Files. The "JSON output mode" section of
docs/usermanuals/en/operations/cicd.md(about lines 146-153) and of its Turkish mirrordocs/usermanuals/tr/operations/cicd.md(about lines 147-154).What is wrong.
jq '.verdict'and shows"success". The training result has noverdictkey, so jq printsnull; the key issuccess. The envelope is built by_build_result_json_envelopeinforgelm/cli/_result.py._setup_logginginforgelm/cli/_logging.pyonly raises the log level to WARNING; logs stay plain text on stderr and stdout carries only the envelope.What to change (already decided).
In both languages, change the example to the block below. The block is identical in English and Turkish:
EN: replace the sentence under the block with:
The JSON envelope goes to stdout; human-readable logs go to stderr. See [JSON output schemas](#/reference/json-output) for every field.TR: replace the matching sentence with:
JSON envelope **stdout**'a gider; insana okunabilir loglar **stderr**'e gider. Tüm alanlar için [JSON çıktı şemaları](#/reference/json-output) sayfasına bakın.The first half is copied from the Turkish JSON-output page, so you do not need to write Turkish; a maintainer reads it in review.Leave the three
forgelm audit ... | jq -e '.verdict != "errors" ...'lines higher up on the page alone. They belong to TR mirror drift in docs/usermanuals/en/operations/cicd.md: GitLab audit job:forgelm audit data/train.jsonl --output-format json | jq -e '.verdict != "errors" and .pii_summary.severity != "high"'(… (DOC-TR15-001) #357.Note for the PR description. #412 tracks real training runs that print some library text to stdout before the envelope. This PR corrects only the documented key and the logging sentence; it changes no code.
Test. Add a test to
tests/test_usermanual_reference_consistency.pyand parametrize it overlangin("en", "tr").docs/usermanuals/<lang>/operations/cicd.mdand find the--output-format json | jq '<filter>'line of the training run._build_result_json_envelope(TrainResult(success=True)).forgelm.cli._resultandforgelm.resultsprovide them;tests/test_strict_json.pyimports both.also emitted as a JSON object on stdout, in Turkishstdout'ta da JSON nesnesi olarak çıkar.The test fails today and passes after the fix.
Add one line under
## [Unreleased]→### FixedinCHANGELOG.md.Open the PR against
developmentwithFixes #433andFixes #216(findingsCR-A04-008andDOC-D3B02-016).Mr-Neutr0n commentedon Nov 2, 2026
/assign
github-actions commentedon Nov 2, 2026
Assigned to @Mr-Neutr0n. Thank you! Please open the pull request against
developmentand link it withFixes #433(orRefs #433if it resolves only part of a grouped issue); see Working on an issue. If you cannot continue, comment/unassignso someone else can take it.docs: complete CI/CD JSON output review fixes
fix: preserve CI exit provenance and guide section routes
test: cover zero-exit failures and native guide clicks