Repository navigation
User-manual quick example fails with exit 1 and prints output the tool never produces (EN and TR) (CR-A12-004) #395
Description
Wave 1 · theme D1-4: Data audit, PII/secret detection and ingestion · highest severity High · 1 finding(s) · effort trivial
Summary
A new user pastes the quick example, gets exit 1, and sees none of the advertised output.
Primary finding
CR-A12-004 — User-manual quick example fails with exit 1 and prints output the tool never produces (EN and TR)
severity High · reachability default · intent contract-violation · confidence confirmed · independently confirmed · reproduced end to end
What happens. docs/usermanuals/en/data/ingestion.md:26-37 (TR :26-37) shows 'forgelm ingest ./policies/ --recursive --strategy markdown --chunk-tokens 1024 --all-mask --output data/policies.jsonl' with no --tokenizer. ingest_path raises ValueError '--chunk-tokens requires --tokenizer MODEL_NAME' (ingestion.py:2393-2396) and the CLI exits 1. Dynamic check on the snapshot: rc=1, 'Ingest failed: --chunk-tokens requires --tokenizer MODEL_NAME ...'. The four tick-mark lines ('scanned 47 files', 'extracted 12,240 chunks (avg 743 tokens)', 'masked 18 PII matches', 'wrote ... (8.2 MB)') do not exist; the real text output is the 'Ingestion summary' block from summarize_result (ingestion.py:2783-2802: Output JSONL, Files, Chunks, Total chars, By format, Note, Next). The example is the first command a new user copies. tools/check_cli_help_consistency.py passes it because it validates argparse syntax only, not cross-flag requirements.
Where.
docs/usermanuals/en/data/ingestion.md:26-35docs/usermanuals/tr/data/ingestion.md:25-35forgelm/ingestion.py:2396-2400forgelm/ingestion.py:2783-2805forgelm/cli/subcommands/_ingest.py:195-211forgelm/cli/_parser.py:310-312
Evidence.
- fpy -m forgelm ingest t/in --recursive --strategy markdown --chunk-tokens 1024 --all-mask --output t/out1.jsonl -> rc=1; summarize_result format in snapshot.
Recommended fix. Add --tokenizer to the example and replace the output block with the real summarize_result text (or the JSON envelope).
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.The first command on the Document Ingestion page fails.
--chunk-tokensneeds--tokenizer, so a user who pastes it getsIngest failed: --chunk-tokens requires --tokenizer MODEL_NAME ...and exit code 1. The output shown under it (✓ scanned 47 files ...) is also something the tool never prints.Files. The "Quick example" in
docs/usermanuals/en/data/ingestion.md(lines 26-35) and the same block indocs/usermanuals/tr/data/ingestion.md("Hızlı örnek", lines 26-35). The rule and the real output come fromforgelm/ingestion.py: search forrequires --tokenizerand forsummarize_result.What to change (already decided).
--chunk-tokens 1024and add--tokenizer "Qwen/Qwen2.5-7B-Instruct", the formdocs/guides/ingestion.mduses. The rest of the page is written around--chunk-tokens, so do not switch to--chunk-size.summarize_resultlayout; the numbers are illustrative.$ forgelm ingest ./policies/ \ --recursive \ --strategy markdown \ --chunk-tokens 1024 \ --tokenizer "Qwen/Qwen2.5-7B-Instruct" \ --all-mask \ --output data/policies.jsonl Ingestion summary Output JSONL : data/policies.jsonl Files (in/out): processed=47 skipped=0 Chunks : 12240 Total chars : 28410553 By format : docx=8, md=27, pdf=12 Note : PII masking redacted 18 span(s): email=11, phone=7 Note : Secrets masking enabled — no credentials detected in this corpus Next: forgelm audit data/policies.jsonl --output ./audit/ Or train: forgelm --config <your.yaml> (set data.dataset_name_or_path: data/policies.jsonl)You can check the layout without downloading a model: point
--tokenizerat any tokenizer directory you have locally.Test. Add a test to
tests/test_usermanual_reference_consistency.py, modelled onTestGdprPageStaysExecutable, and parametrize it overlangin("en", "tr").docs/usermanuals/<lang>/data/ingestion.mdand take the first shell block that containsforgelm ingest.\continuation lines and split the command withshlex.split.--chunk-tokenscomes with--tokenizer, and that the page shows the labelssummarize_resultprints (Ingestion summary,Files (in/out)).The test fails today and passes after the fix.
Add one line under
## [Unreleased]→### FixedinCHANGELOG.md.Open the PR against
developmentwithFixes #395(findingCR-A12-004).lesbass commentedon Oct 22, 2026
/assign
github-actions commentedon Oct 22, 2026
Assigned to @lesbass. Thank you! Please open the pull request against
developmentand link it withFixes #395(orRefs #395if it resolves only part of a grouped issue); see Working on an issue. If you cannot continue, comment/unassignso someone else can take it.fix(docs): make the ingestion quick-start example runnable (HodeTech#395