Release/75 - #6474
Draft
bobbykolev wants to merge 15 commits into
Draft
Conversation
Release 74
) * fix: stop whiteboard-draft sweep crashing on distinctAlias column The hourly WhiteboardDraftSweepService.sweep crashed on every run with Postgres 42703 (column "distinctAlias.Whiteboard_draftExpiresAt" does not exist). findExpired used repository.find({ select: { id: true }, order: { draftExpiresAt: 'ASC' }, take }). Whiteboard's inherited eager `authorization` relation forces a LEFT JOIN, so TypeORM applied the LIMIT by wrapping the read in a `SELECT DISTINCT ... FROM (<inner>) "distinctAlias"` pagination query. It appended the ORDER BY column to the outer select/order, but because `select` restricted the inner projection to `id`, the derived table never emitted `draftExpiresAt` — so the outer reference could not resolve. It is a query-construction defect, not a schema/migration problem: the column exists, and it failed on every sweep regardless of data. Rebuild findExpired as an explicit, join-free query that selects only the scalar `id`, which keeps the SQL flat and avoids the distinct-alias path. Tests: the service spec now drives the query builder and guards against regressing to the eager-join `find` path (proven red against the old code); a new find-expired.query.spec builds real TypeORM SQL offline to show the old option shape omits the ORDER BY column from its projection while the new query is flat and self-consistent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013tVHtw561B9drGNY6kL8BS * test: await protected buildMetadatas() in a beforeAll Addresses CodeRabbit review on #6437. In our TypeORM fork buildMetadatas() is async and populates entityMetadatas only after two awaits, so calling it at describe-body scope and discarding the promise left correctness to depend on the tick gap before the it() callbacks. Await it in an async beforeAll so metadata is deterministically populated before any createQueryBuilder call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013tVHtw561B9drGNY6kL8BS * refactor: unify sweep expiry predicate + harden find-expired tests Addresses the /code-review high pass on #6437 (fix itself confirmed correct): - findExpired now expresses the expiry boundary as `.where({ draftExpiresAt: LessThanOrEqual(new Date()) })`, the same operator cleanupExpired's locked re-read uses, so the candidate query and the re-check can't drift (was a raw string after the initial fix). Generated SQL is identical and still flat/join-free. - find-expired.query.spec: match on our own identifiers + case-insensitive keywords instead of exact quoting/casing, so a fork SQL-formatting change can't silently break or falsely pass; mirror the object-where form; and reframe the old-shape test honestly as asserting the distinct-alias *precondition* (join present + ORDER BY column unprojected), not the executed crash. The real-code behavioural guard stays in the service spec. - service spec asserts the where() operator is a lessThanOrEqual FindOperator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013tVHtw561B9drGNY6kL8BS --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: repin TypeORM preview dependency * fix: use durable TypeORM package
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
📊 PR Metrics SummaryTitle: Release/75
Flags
Thresholds{
"critical_loc": 200,
"simple_loc": 100,
"file_count": 10
} |
|
Schema Diff Summary: No blocking changes
Baseline branch: master |
* feat: add signing attempt persistence * test: strengthen signing persistence evidence * test: specify memo signing preparation * test: strengthen signing persistence evidence * test: specify memo signing API boundaries * test: retain changed coverage evidence * test: specify actor-bound signing attempt read * test: fail closed on missing coverage targets * test: support shallow CI coverage checkouts * test: address final signing persistence review * feat: prepare memo signing previews * test: retain changed coverage evidence * test: fail closed on missing coverage targets * test: support shallow CI coverage checkouts * test: address final signing persistence review * test: enforce signing preview coverage * chore: update signing preview schema * test: verify signing preview glyph behavior * test: specify memo signing continuation * test: verify signing preview glyph behavior * feat: harden memo signing preparation * fix: map lost memo access in signing preview * test: cover prepare deletion boundaries * test: tie live-read failure to memo deletion * test: label modelled collaboration deletion boundary * test: model collaboration purge error precisely * feat: start memo signing through trust gateway * test: prove memo signing continuation boundaries * fix: close memo signing continuation gates * test: specify memo signing return flow * test: assert safe signing failure logs * fix: address memo signing review findings * test: include signing inputs in scoped coverage * test: report file-service revision mismatch * feat: complete memo signing returns * fix: harden memo signing returns * test: harden memo signing return wiring * fix: validate memo signing gateway responses * feat: wire local memo signing gateway * docs: make local signing fixture reproducible * docs: correct signing gateway eviction check * chore: pin trust gateway v0.2.0 locally * feat: verify signed memo integrity * fix: tighten memo signature verification * docs: add sandbox signing acceptance runbook * docs: correct sandbox signing prerequisites * chore: pin trust gateway v0.2.1 * fix: populate authentication identity in actor context * test: verify actor context identity caching The User authenticationID query runs only on an actor-context cache miss. The complete context, including authenticationID, is retained in the existing per-actor cache entry. * fix: route memo signing previews to server The generated preview URL uses the private REST content-signing prefix. The local quickstart now gives that owned prefix a dedicated GET router instead of falling through to the client catch-all. * docs: verify natural signing expiry The Alkemio browser gate leaves a continued attempt uncompleted and observes the persisted deadline plus sweep outcome. Gateway restart eviction remains covered by the gateway contract tests rather than the local Alkemio journey.
Move the real-service suite out of the trusted ARC test job, which has no Docker daemon, into an unconditional Ubuntu job. Keep unit LCOV and Sonar wiring unchanged while retaining scoped integration coverage as a separate artifact.
* test(signing): define space gating behavior Capture the RED expectations for default-off license propagation, endpoint enforcement, and the entitlement migrations before the implementation. * feat(signing): gate signing by space license Add a default-off memo-signing space entitlement and license plan, inherit it through collaboration licenses, and enforce it before prepare and continue side effects. Existing signed-copy reads and verification remain available. * docs(migrations): clarify signing rollback scope * test(signing): pin space gating boundaries * docs(signing): record entitlement boundaries
chore: update schema baseline
Co-authored-by: Bobby Kolev <bobbykolev@abv.bg>
* test(signing): cover certificate subject mapping RED: the existing reader still returns the OIDC provider subject when certificate metadata is present, including malformed or unusable claims. * feat(signing): map Cleverbase certificate subject Prefer the subject serialNumber RDN from the mapped signing-certificate PEM while retaining the linked-provider prerequisite. Fall back to the provider subject only when the metadata claim is absent; present invalid claims fail closed. * test(signing): cover stored ID token mapping RED: the existing metadata_admin implementation falls back for seven token-path cases. The approved design reads the already declassified initial ID token from the same Kratos response. * feat(signing): map stored Cleverbase ID token Kratos validates and stores the initial ID token when the OIDC provider is linked, then declassifies it on the existing admin identity response. Read the signing certificate from that token payload without a second Kratos call; preserve fallback only for absent token or claim and fail closed for malformed present data. * test(signing): cover token fallback diagnostics * fix(signing): decode stored Cleverbase ID token safely
* test(memo): reproduce signing PDF structure loss * fix(memo): preserve block structure in signing PDFs * fix(memo): preserve blank paragraph representation * fix(memo): preserve mixed nested list hierarchy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.