Nachbearbeitung: verbliebene Meilensteinbezüge in Produktivdokumentation
bereinigt
This commit is contained in:
@@ -14,9 +14,6 @@ import java.time.Instant;
|
||||
* <p>
|
||||
* By isolating time access behind a port, the application can be tested with
|
||||
* deterministic time values without requiring system clock manipulation.
|
||||
* <p>
|
||||
* This port is defined in M2 for use in later milestones where timestamps
|
||||
* become relevant (e.g., run history, document date fallback).
|
||||
*
|
||||
*/
|
||||
public interface ClockPort {
|
||||
|
||||
@@ -4,7 +4,7 @@ import de.gecheckt.pdf.umbenenner.application.config.StartConfiguration;
|
||||
|
||||
/**
|
||||
* Outbound port for configuration access.
|
||||
* AP-005: Minimal interface for loading typed startup configuration.
|
||||
* Provides a minimal interface for loading typed startup configuration.
|
||||
*/
|
||||
public interface ConfigurationPort {
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import java.util.Objects;
|
||||
* The document is known (fingerprint exists in the persistence store) but its overall
|
||||
* status is neither {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#SUCCESS}
|
||||
* nor {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#FAILED_FINAL}.
|
||||
* The use case may continue with normal M4 processing using the provided record.
|
||||
* The use case may continue with normal processing using the provided record.
|
||||
* <p>
|
||||
* The existing {@link DocumentRecord} is supplied so the use case can inspect the
|
||||
* current status, failure counters, and other fields required to apply M4 retry rules
|
||||
* current status, failure counters, and other fields required to apply retry rules
|
||||
* without an additional lookup.
|
||||
*
|
||||
* @param record the current master record for this document; never null
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Objects;
|
||||
* Mapping between {@code DocumentRecord} and the persistence layer is performed
|
||||
* exclusively by the repository adapter in {@code adapter-out}.
|
||||
* <p>
|
||||
* <strong>M4 field semantics:</strong>
|
||||
* <strong>Field semantics:</strong>
|
||||
* <ul>
|
||||
* <li>{@link #fingerprint()} — primary identity; never changes for a given record.</li>
|
||||
* <li>{@link #lastKnownSourceLocator()} — opaque locator used by adapters; the
|
||||
@@ -37,8 +37,7 @@ import java.util.Objects;
|
||||
* <li>{@link #updatedAt()} — timestamp of the most recent update to this master record.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* <strong>Not included in M4:</strong> target path, target file name, AI-related fields.
|
||||
* These are added in later milestones.
|
||||
* <strong>Not yet included:</strong> target path, target file name, AI-related fields.
|
||||
*
|
||||
* @param fingerprint content-based identity; never null
|
||||
* @param lastKnownSourceLocator opaque locator to the physical source file; never null
|
||||
|
||||
@@ -3,7 +3,7 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
/**
|
||||
* Sealed result type for a document master record lookup via {@link DocumentRecordRepository}.
|
||||
* <p>
|
||||
* The use case uses this result to make the per-document processing decision in M4
|
||||
* The use case uses this result to make the per-document processing decision
|
||||
* without additional assumptions:
|
||||
* <ul>
|
||||
* <li>{@link DocumentUnknown} — the fingerprint is not yet in the persistence store;
|
||||
|
||||
@@ -4,7 +4,7 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* Lookup result indicating that the fingerprint is not yet present in the persistence store.
|
||||
* <p>
|
||||
* The document has never been processed before. The use case must create a new
|
||||
* {@link DocumentRecord} and proceed with normal M4 processing.
|
||||
* {@link DocumentRecord} and proceed with normal processing.
|
||||
* <p>
|
||||
* This variant carries no data because there is no existing record to return.
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
/**
|
||||
* Immutable snapshot of the two independent failure counters maintained per document.
|
||||
* <p>
|
||||
* M4 tracks two distinct counters separately because they drive different retry rules:
|
||||
* Two distinct counters are tracked separately because they drive different retry rules:
|
||||
* <ul>
|
||||
* <li><strong>Content error counter</strong> ({@link #contentErrorCount()}):
|
||||
* counts how many times a deterministic content error occurred for this document
|
||||
|
||||
@@ -20,7 +20,7 @@ import de.gecheckt.pdf.umbenenner.domain.model.SourceDocumentCandidate;
|
||||
* A {@link FingerprintTechnicalError} result means no
|
||||
* {@link de.gecheckt.pdf.umbenenner.domain.model.DocumentFingerprint} is available
|
||||
* and the candidate cannot be identified; consequently no SQLite attempt record is
|
||||
* created for this candidate in M4.
|
||||
* created for this candidate.
|
||||
*
|
||||
*/
|
||||
public interface FingerprintPort {
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
* <p>
|
||||
* Carries the computed {@link DocumentFingerprint} that uniquely identifies the
|
||||
* document by its content. The fingerprint can now be used as the primary key
|
||||
* for all subsequent persistence operations in M4.
|
||||
* for all subsequent persistence operations.
|
||||
*
|
||||
* @param fingerprint the successfully computed fingerprint; never null
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* <p>
|
||||
* This port is invoked exactly once per program run, <em>before</em> the batch
|
||||
* document processing loop begins. The initialisation must ensure that all tables,
|
||||
* indices, and constraints required for M4 persistence are present in the SQLite file.
|
||||
* indices, and constraints required for document persistence are present in the SQLite file.
|
||||
* <p>
|
||||
* <strong>Timing:</strong> The adapter implementation must perform the schema
|
||||
* initialisation eagerly and synchronously. Lazy or deferred initialisation during
|
||||
@@ -27,7 +27,7 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
public interface PersistenceSchemaInitializationPort {
|
||||
|
||||
/**
|
||||
* Creates or verifies the M4 persistence schema.
|
||||
* Creates or verifies the persistence schema.
|
||||
* <p>
|
||||
* Must be called once at program start, before any document processing begins.
|
||||
* The method must be idempotent: calling it on an already-initialised database
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
* Application-facing representation of exactly one historised processing attempt
|
||||
* (Versuchshistorie-Eintrag) for an identified document.
|
||||
* <p>
|
||||
* <strong>Historisation boundary (M4):</strong> Only attempts for documents whose
|
||||
* <strong>Historisation boundary:</strong> Only attempts for documents whose
|
||||
* {@link DocumentFingerprint} was successfully computed are historised. Failures that
|
||||
* occur <em>before</em> the fingerprint is available (e.g. the source file is
|
||||
* unreadable before hashing) are <em>not</em> represented by a {@code ProcessingAttempt}
|
||||
@@ -42,9 +42,8 @@ import java.util.Objects;
|
||||
* later run; {@code false} for final failures, successes, and skip attempts.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* <strong>Not included in M4:</strong> model name, prompt identifier, AI raw response,
|
||||
* <strong>Not yet included:</strong> model name, prompt identifier, AI raw response,
|
||||
* AI reasoning, resolved date, date source, final title, final target file name.
|
||||
* These fields are added in later milestones (M5+).
|
||||
*
|
||||
* @param fingerprint content-based document identity; never null
|
||||
* @param runId identifier of the batch run; never null
|
||||
|
||||
@@ -20,9 +20,6 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* <li>Hold the lock for the entire batch run</li>
|
||||
* <li>Release the lock cleanly at batch end (even on failure, if possible)</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* This port is used by the batch use case (M2-AP-004) but not implemented in M2;
|
||||
* implementation follows in M2-AP-006.
|
||||
*
|
||||
*/
|
||||
public interface RunLockPort {
|
||||
|
||||
@@ -490,7 +490,7 @@ public class DocumentProcessingCoordinator {
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// M3 → outcome mapping
|
||||
// Extraction outcome mapping
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
* — Pre-check evaluation logic</li>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.application.service.DocumentProcessingService}
|
||||
* — Complete document processing pipeline orchestration</li>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.application.service.M4DocumentProcessor}
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.application.service.DocumentProcessingCoordinator}
|
||||
* — Per-document idempotency, status/counter mapping and consistent
|
||||
* two-level persistence</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h2>Document processing flow ({@code M4DocumentProcessor})</h2>
|
||||
* <h2>Document processing flow ({@code DocumentProcessingCoordinator})</h2>
|
||||
* <p>
|
||||
* The {@link de.gecheckt.pdf.umbenenner.application.service.M4DocumentProcessor}
|
||||
* The {@link de.gecheckt.pdf.umbenenner.application.service.DocumentProcessingCoordinator}
|
||||
* implements the required processing order per candidate:
|
||||
* <ol>
|
||||
* <li>Load the document master record by fingerprint.</li>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* <li>If fingerprint computation fails: log as non-identifiable run event;
|
||||
* do NOT write any SQLite record; continue with next candidate.</li>
|
||||
* <li>Run the document extraction and pre-checks pipeline.</li>
|
||||
* <li>Delegate to {@link de.gecheckt.pdf.umbenenner.application.service.M4DocumentProcessor}
|
||||
* <li>Delegate to {@link de.gecheckt.pdf.umbenenner.application.service.DocumentProcessingCoordinator}
|
||||
* for idempotency check, status/counter mapping, and consistent persistence.</li>
|
||||
* </ol>
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user