Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Ingestion guide's AWS Textract recipe reads only the first GetDocumentTextDetection page and never checks JobStatus, silently truncating multi-page OCR text (F-W1-DOCS-TRAIN-13)

Ouverte Adaptée aux débutants
#883 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
72/100
Type d'issue
Documentation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
aws, shell
Domaine
data, documentation

Piste de recherche

La recette se trouve dans docs/guides/ingestion.md lignes 634-650, avec l'unique appel à get_document_text_detection vers la ligne 644, et la version miroir en turc dans docs/guides/ingestion-tr.md lignes 652-668. Commencez par lire l'appel start-document-text-detection de l'étape 2 pour voir où JobId doit être capturé. C'est terminé lorsque l'extrait capture JOB_ID, attend JobStatus, boucle sur NextToken pour écrire chaque bloc LINE dans l'ordre, et que les deux versions linguistiques correspondent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

documentation severity: medium source: review-2026-09 wave: 3

Wave 3 · group W3 Docs · highest severity Medium · 1 finding(s) · effort docs fix

Summary

The OCR recipe makes one get_document_text_detection call, writes the LINE blocks it returns and runs forgelm ingest on the result. Textract returns at most 1,000 blocks per call — PAGE, LINE and WORD blocks all count — plus a NextToken for the rest, so a typical multi-page scan is cut short with no error and the truncated text becomes training data.

Primary finding

F-W1-DOCS-TRAIN-13 — The Textract recipe silently truncates paginated OCR output

severity Medium · confidence high · checked against the AWS API reference

What happens. docs/guides/ingestion.md:634-650 (Turkish mirror docs/guides/ingestion-tr.md:652-668); the single call is at EN :644 / TR :662. The snippet never follows NextToken and never checks JobStatus, so a job that is still IN_PROGRESS, FAILED or only a PARTIAL_SUCCESS looks the same as a finished one. It also uses $JOB_ID without showing where it comes from: the start-document-text-detection call in step 2 does not capture the returned JobId.

Where.

Evidence (re-verified on 2026-10-09).

  • AWS Textract API reference, GetDocumentTextDetection: results are paginated; when a response includes NextToken, call the operation again with it to get the next set; MaxResults defaults to 1,000 (https://docs.aws.amazon.com/textract/latest/APIReference/API_GetDocumentTextDetection.html).
  • The source review ran the embedded snippet against a two-page stub client: it made one call, printed only the first page and exited normally.
  • Both guide pages are unchanged on development.

Recommended fix. Capture the job id (JOB_ID=$(aws textract start-document-text-detection … --query JobId --output text)), wait until JobStatus is no longer IN_PROGRESS (or point to AWS's polling / SNS pattern), stop with an error on FAILED, print a warning on PARTIAL_SUCCESS, and loop over NextToken so every page's LINE blocks are written in order before forgelm ingest runs.

Acceptance criteria

  • The recipe follows NextToken until it is absent and writes every LINE block in order.
  • A failed or still-running job stops the recipe before forgelm ingest; a partial success is reported.
  • The snippet shows where JOB_ID comes from.
  • Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
  • The finding is resolved or explicitly closed with a reason.

Found by the September 2026 independent review of ForgeLM against commit cab2947 and re-verified against development at f94595f on 2026-10-09. Code links point at cab2947; line numbers may have moved since. Finding IDs (F-W1-…) are stable references for this backlog.

Langage dominant
Python
Étoiles
9
Forks
1
Merge moyen
7 h 53 min
PR mergées (30 j)
58

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de HodeTech/ForgeLM

Toutes les issues de HodeTech/ForgeLM

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.