Comprehend
Parity grade: A · SDK aws-sdk-go-v2/service/comprehend@v1.49.3 · last audited 2026-10-07 (a2084957b)
Category: Machine Learning · View PARITY.md on GitHub · All Services
Parity & Coverage
| Metric | Value |
|---|---|
| PARITY entries audited | 28 (28 ok) |
| Feature families | 1 (1 ok) |
| Known gaps | none |
| Structural gaps (can't be emulated) | 1 |
| Deferred items | 1 |
| Resource leaks | clean |
Structural Gaps
These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.
- ClassifyDocument/DetectEntities Bytes of PDF, Word and image documents (DocumentReaderConfig effect): text extraction needs Amazon Textract; plain-text Bytes are decoded and DocumentReaderConfig is validated, binary documents are rejected.
Deferred Items
- ALREADY COVERED BY CHAOS (verified gopherstack-sw2q): ResourceLimitExceededException/ResourceUnavailableException/TooManyRequestsException/ConcurrentModificationException are real modeled errors for several ops here (confirmed against deserializers.go's per-op error-case switches) but have no non-fabricated deterministic backend-state trigger in this emulator: no rate limiting is implemented anywhere in gopherstack per-service, no fixed per-account resource quota is documented precisely enough to emulate without risking false failures on legitimate high-volume test/integration usage, and ConcurrentModificationException describes a real-AWS eventual-consistency race that cannot occur under this backend's single coarse lock. Concretely verified this pass: comprehend.Handler implements ChaosServiceName() -> "comprehend" and ChaosOperations() -> h.GetSupportedOperations() (handler.go), and pkgs/chaos.Middleware is wired globally via registry.Use(chaos.Middleware(faultStore)) in internal/app/cli.go, matching purely on the request's SigV4 service name + X-Amz-Target operation + region and injecting an arbitrary caller-specified FaultError{Code, StatusCode} without touching backend state. A fault rule such as {"service":"comprehend","error":{"code":"TooManyRequestsException","statusCode":429}} deterministically returns that exact typed error to a real aws-sdk-go-v2 client on any operation, with zero backend code changes -- proven end-to-end against a real containerized client in test/integration/chaos_test.go. Error-code wiring in errors.go/handler.go intentionally does not include backend sentinels for these four; the chaos mechanism is the correct, non-fabricated way to exercise them, not a backend-state workaround.
Audited Operations
28 audited operations
| Operation | Wire | Errors | State | Persist |
|---|---|---|---|---|
DetectSentiment | ok | ok | ok | n/a |
DetectEntities | fixed | ok | ok | n/a |
DetectKeyPhrases | ok | ok | ok | n/a |
DetectPiiEntities | ok | ok | ok | n/a |
DetectSyntax | ok | ok | ok | n/a |
DetectDominantLanguage | ok | ok | ok | n/a |
DetectToxicContent | ok | ok | ok | n/a |
DetectTargetedSentiment | ok | ok | ok | n/a |
ClassifyDocument | ok | ok | ok | n/a |
ContainsPiiEntities | ok | ok | ok | n/a |
BatchDetect-family (Sentiment/Entities/KeyPhrases/Syntax/DominantLanguage/TargetedSentiment -- 6 families excluding PiiEntities) | ok | ok | ok | n/a |
StartDetectionJob-family (9 families) | ok | ok | ok | ok |
DescribeDetectionJob-family | ok | ok | ok | ok |
ListDetectionJobs-family | ok | ok | ok | ok |
StopDetectionJob-family (7 of 9 families -- NOT DocumentClassificationJob or TopicsDetectionJob) | ok | ok | ok | ok |
CreateDocumentClassifier/CreateEntityRecognizer | ok | ok | ok | ok |
DescribeDocumentClassifier/DescribeEntityRecognizer | ok | ok | ok | ok |
ListDocumentClassifiers/ListEntityRecognizers | ok | ok | ok | ok |
DeleteDocumentClassifier/DeleteEntityRecognizer | ok | ok | ok | ok |
CreateEndpoint/DescribeEndpoint/ListEndpoints/UpdateEndpoint/DeleteEndpoint | ok | ok | ok | ok |
CreateFlywheel/DescribeFlywheel/ListFlywheels/UpdateFlywheel/DeleteFlywheel | ok | ok | ok | ok |
CreateDataset/DescribeDataset/ListDatasets | ok | ok | ok | ok |
StartFlywheelIteration/DescribeFlywheelIteration/ListFlywheelIterationHistory | ok | ok | ok | ok |
TagResource/UntagResource/ListTagsForResource | ok | ok | ok | ok |
ImportModel | ok | ok | ok | ok |
ListDocumentClassifierSummaries/ListEntityRecognizerSummaries | ok | ok | ok | n/a |
StopTrainingDocumentClassifier/StopTrainingEntityRecognizer | ok | ok | ok | ok |
Put/Describe/DeleteResourcePolicy | ok | ok | ok | ok |
Audited Feature Families
| Feature Family | Status |
|---|---|
routing | ok |
