feat: Lau 6 workspace evidence pack - #293
Conversation
…plication and ordering
…te documents of diff category are isolated in collection
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3410a40b55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const body = normalizeSqlMigrationBody( | ||
| await readFile(join(migrationsDir, name), "utf8"), | ||
| ); | ||
| const checksum = createHash("sha256").update(body).digest("hex"); |
There was a problem hiding this comment.
Retain legacy checksums when stripping migration BOMs
On databases where 0005_experimental_embeddings.sql was applied by the previous runner, its recorded checksum includes the file's existing UTF-8 BOM. Normalizing the body before this comparison produces a different checksum, so every such deployment reports migration drift and exits with status 1, potentially after applying 0016; preserve compatibility with the previously recorded checksum or migrate that checksum explicitly.
Useful? React with 👍 / 👎.
|
|
||
| if (result.outcome === "updated" || result.outcome === "idempotent") { | ||
| if (result.run.status === "failed" || result.run.status === "queued") { | ||
| return result.run; |
There was a problem hiding this comment.
Return successful retry operations after queue advancement
When a client repeats a successful retry request after a worker has already claimed or completed the run, the repository still returns outcome: "idempotent" because the recorded operation matches the unchanged failure sequence, but this status restriction rejects the result as an invalid transition. A delayed duplicate of an acknowledged retry can therefore fail solely because the run advanced from queued; return idempotent outcomes regardless of the current status, since stale failure cycles are already reported as conflicts by the repository.
Useful? React with 👍 / 👎.
| throw new FounderWeeklyReviewClaimOwnershipMismatchError(context.runId); | ||
| } | ||
| throw new FounderWeeklyReviewInvalidTransitionError(result.run.status, "save draft"); | ||
| } |
There was a problem hiding this comment.
Make successful draft saves replayable
If the draft update commits but the worker loses the response or is retried before acknowledging its job, a second saveGeneratedDraft with the same claim finds the run in draft with the matching claim ID and reaches this invalid-transition error. This turns a successfully persisted generation into a reported worker failure; treat a matching-claim draft as an idempotent replay, optionally verifying that the persisted payload and metadata match.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Next time in our all hands can we have a visualization of how the databases are stored. I am not sure what the run and the run operation represent
Summary
Implemented the evidence-pack pipeline for founder weekly review: for a given company and specified reporting week, collect evidence from workspace sources and create a FounderWeeklyReviewEvidenceSnapshot.
Checklist
Testing
Remaining Work