Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4d43a87
feat: open Customer master related posts onto Event Lineage (v2.15.0)
seonghobae Aug 19, 2026
2e2449d
test: keep customer master router specific
seonghobae Aug 20, 2026
0c490d9
fix(ui): preserve Customer master loading ownership
seonghobae Aug 20, 2026
cf73700
chore: restack Customer Master on current Calendar head
seonghobae Aug 20, 2026
7d90962
chore: restack Customer Master on current Calendar head
seonghobae Aug 20, 2026
6ba87bf
chore: restack Customer Master on current Calendar
seonghobae Aug 20, 2026
927c347
chore: restack Customer Master on current Calendar
seonghobae Aug 20, 2026
7303676
chore: reconcile remote Customer Master restack
seonghobae Aug 20, 2026
8d88140
chore: restack Customer Master on final Calendar
seonghobae Aug 20, 2026
fd5fa65
chore: restack Customer Master on final Calendar
seonghobae Aug 20, 2026
7d949fa
chore: restack Customer Master on final Calendar
seonghobae Aug 20, 2026
cadc818
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 20, 2026
38d2e67
Merge commit 'b829464254ff0aff5dfd18dcb1443fb571c7f63e' of https://gi…
seonghobae Aug 20, 2026
55934e2
fix: avoid customer ADR number collision
seonghobae Aug 20, 2026
d947b87
fix: align embedded image accessibility assertion
seonghobae Aug 20, 2026
cfab260
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 20, 2026
dd4e220
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 20, 2026
49d2851
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 20, 2026
d716edc
Merge current calendar lineage base into customer lineage
seonghobae Aug 20, 2026
e975649
chore: sync lock metadata with release version
seonghobae Aug 20, 2026
6e86c25
merge: propagate current calendar lineage base
seonghobae Aug 20, 2026
7b21e87
merge: propagate corrected Weekly VOC lineage base
seonghobae Aug 20, 2026
5157b51
merge: propagate current protected board base
seonghobae Aug 20, 2026
b03cec1
merge: propagate current board branch head
seonghobae Aug 20, 2026
80445b8
merge: propagate current semantic-source parent
seonghobae Aug 20, 2026
8a01449
test: type latest VOC backend fixture input
seonghobae Aug 20, 2026
5fcfbea
Merge branch 'feat/calendar-open-focus-event-lineage-v2140' of https:…
seonghobae Aug 20, 2026
d061571
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 20, 2026
90412ed
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 21, 2026
cc0a890
Merge remote-tracking branch 'origin/feat/calendar-open-focus-event-l…
seonghobae Aug 21, 2026
e3f4561
Merge current calendar stack and wire customer tree
seonghobae Aug 21, 2026
1803ab3
feat: redesign Customer Master around three-pane relationships
seonghobae Aug 21, 2026
7093c8b
fix: align core ontology with ORG and SHACL contract
seonghobae Aug 21, 2026
5e706b7
fix: keep malformed customer parents unresolved
seonghobae Aug 21, 2026
4dba417
fix: require complete organization token corroboration (#327)
seonghobae Aug 21, 2026
7e2982b
feat: name Weekly VOC and focus Event Lineage (v2.13.0) (#260)
seonghobae Aug 21, 2026
427a7a1
Merge current PR #261 head into PR #262
seonghobae Aug 21, 2026
b8e1b30
feat: open Ask Agent cited posts onto Event Lineage (v2.16.0) (#263)
seonghobae Aug 21, 2026
125a806
feat: publish external email and project lineage contract (#343)
seonghobae Aug 21, 2026
63d12af
fix: keep ADR numbers unique after customer master restack
seonghobae Aug 21, 2026
1ae3c40
Merge concurrent PR #263 updates into PR #262
seonghobae Aug 21, 2026
c2d7207
feat: publish bounded lineage provider contract (#340)
seonghobae Aug 21, 2026
b521812
fix: expose Ask Agent next actions
seonghobae Aug 21, 2026
041aa4c
fix: preserve semantic document evidence units (#302)
seonghobae Aug 21, 2026
1a2ad15
fix: keep ADR identifiers unique and references consistent
seonghobae Aug 21, 2026
62bcd71
chore: restack customer master on current parent #258
seonghobae Aug 21, 2026
efcc3c6
fix: enforce TEPP request and search evidence boundaries (#323)
seonghobae Aug 21, 2026
4e24688
chore: restack customer master on latest parent
seonghobae Aug 21, 2026
6c39a0d
fix: disclose unused and malformed lineage LLM paths
seonghobae Aug 21, 2026
be7255d
fix: harden customer master contract delivery
seonghobae Aug 21, 2026
fcb9bd3
fix: publish not-invoked lineage status
seonghobae Aug 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,12 @@ never a fabricated theta or a local psychometric substitute.
Buyer Board **Weekly VOC** is an ISO-8601 week list filter (ADR 0092).
Opening that filtered post focuses Event Lineage (ADR 0093). Do not
invent a week, a theta, or a cutoff body.
Opening a Calendar commitment uses the same focus path (ADR 0094). Do not
Opening a Calendar commitment uses the same focus path (ADR 0134). Do not
invent a week, a theta, a cutoff body, or a CalDAV event.
Opening a Customer master related post uses the same focus path (ADR 0095).
Do not invent a week, a theta, a cutoff body, a CalDAV event, or a customer.
Opening an Ask Agent cited post uses the same focus path (ADR 0096). Do not
invent a cited post.


## Tests
Expand Down
7 changes: 5 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ flowchart LR
| `rankweave_client.py` | Fail-closed RankWeave ranking port (`weighted_reciprocal_rank_fuse` in-process; never invent a fused score or a theta) |
| `reconstruct.py` | The pipeline: group → candidate window → score → fuse → thread |
| `lineage_persistence.py` | Flattens reconstruct trees into `post_lineage_edge` row specs (parent, child, fused_score) |
| `lineage_contract.py` | Versioned, store-agnostic provider boundary for bounded authorized evidence and opaque-reference results |
| `knowledge_graph.py` | Random-walk-with-restart relevance + per-node adaptive related-node cutoff (Tong et al., 2006) -- pure graph math, no Postgres |
| `keyman_extraction.py` | Pluggable LLM extraction of two-sided (our-side/counterparty) person mentions + N:N org affiliations from a post |
| `entity_relationship_classification.py` | Pluggable LLM classification of a named organization's relationship to the post author (`rel_voc`/`rel_vom`/`rel_vop`/`rel_vocc`/`rel_voco`/`rel_vos`) |
Expand Down Expand Up @@ -282,8 +283,10 @@ Keycloak issued; `src/App.tsx` renders a git-branch SVG of
`GET /api/lineage` (click a node to open that post; `post_admin` can
rebuild), the post list with a named Weekly VOC ISO-8601 week filter
(ADR 0092; opening that filtered post focuses Event Lineage, ADR 0093),
Calendar commitments use the same Event Lineage focus path (ADR 0094), and
the full detail popup includes Korean
Calendar commitments use the same Event Lineage focus path (ADR 0134),
Customer master related posts use the same Event Lineage focus path
(ADR 0095). Ask Agent cited posts use the same Event Lineage focus path
(ADR 0096), and the full detail popup includes Korean
summary/key-events/R&R, VOC evidence excerpts, an Event Lineage panel
(direct vs. indirect links; a link opens that post), the Keyman
affiliate tree (resolved ancestors plus unresolved org roots), Keyman +
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.d/2.12.7-korean-search-boundary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 2.12.7 — Preserve Korean search corroboration boundaries

## Fixed

- Accept a Korean organization token followed by a grammatical particle in a
natural Searxng snippet while still rejecting the token inside a longer
unrelated Hangul word.
13 changes: 13 additions & 0 deletions CHANGELOG.d/2.12.8-ontology-org-shacl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 2.12.8 Organization ontology and SHACL boundaries

The core Knowledge Graph ontology now distinguishes real organizations from
the concepts used to classify them. `CorporateEntity` and `Team` reuse W3C ORG
organization, organizational-unit, containment, and unit-membership semantics;
SKOS remains responsible for Group, Company, and Plant level concepts and
canonical/alternative labels.

The ontology now publishes stable version/import metadata and a companion
versioned SHACL graph. Regression tests cover the ORG/SKOS boundary, direct
parent and team-owner cardinalities, and the continued relational lookup-code
round trip. PostgreSQL remains authoritative and ontology imports are never
network-dereferenced at runtime.
7 changes: 7 additions & 0 deletions CHANGELOG.d/2.15.0-customer-hierarchy-boundary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 2.15.0 — Keep unresolved customer parents non-authoritative

## Fixed

- A self-parent or cyclic customer relation now remains visibly unresolved in
the focus workspace instead of being presented as a valid parent. Review the
source hierarchy before using that relationship for navigation.
11 changes: 11 additions & 0 deletions CHANGELOG.d/2.15.0-customer-master-open-event-lineage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 2.15.0 Opening a Customer master related post focuses Event Lineage

Customer master names authorized customer entities as current and to open a
related post to read Event Lineage. That open focuses the popup Event Lineage
heading. Home-list opens do not. No TEPP theta is invented.

Customer Master now keeps one customer at the center of a responsive three-pane
workspace: authorized hierarchy, visible parent/direct-child relationships, and
source-backed linked evidence. Closing evidence no longer loses the selected
customer context. Desktop, tablet, and phone layouts use the shared UI tokens
and the 1024 px / 768 px responsive boundaries.
5 changes: 5 additions & 0 deletions CHANGELOG.d/2.16.0-ask-agent-open-event-lineage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 2.16.0 Opening an Ask Agent cited post focuses Event Lineage

Ask Agent names authorized cited posts as current after an answer and to
open one to read Event Lineage. That open focuses the popup Event Lineage
heading. Home-list opens do not. No TEPP theta is invented.
6 changes: 6 additions & 0 deletions CHANGELOG.d/2.16.0-pr262-hardening.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Fixed

- Keep embedded source images visible when a post also contains a Markdown
table, and remove the privileged self-modifying contract-repair workflow.
- Align the Python package version and ontology ADR reference with the 2.16.0
release.
14 changes: 14 additions & 0 deletions CHANGELOG.d/cross-repo-lineage-provider-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Unreleased: bounded cross-repository lineage provider contract

LineageWeave now exposes a versioned, store-agnostic contract for authorized
Naruon-shaped evidence. It preserves opaque evidence references, separate RFC
email fields, project hints, cutoff exclusion, channel limitations, and a
deterministic request digest without reading Naruon's database or claiming
Naruon's authoritative project status. Nested email references and project
hints have explicit request-level ceilings so callers cannot bypass the
bounded-work contract with oversized collections.

Provider failures now become an explicit unavailable-channel limitation and
rerun with renormalized non-LLM weights. Long body text is retained in the
request envelope without being flattened into the short pairwise comparison
label.
14 changes: 14 additions & 0 deletions CHANGELOG.d/customer-master-tree-projection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Fixed

- Customer Master now preserves the authorized Group → Company → Plant hierarchy while promoting
missing-parent, self-parent, and cyclic relations to visible `unresolved` roots instead of silently
dropping those customers.
- Customer hierarchy rendering now follows the ontology's W3C ORG containment and separate SKOS level
classification instead of conflating organization instances with taxonomy concepts.
- Late related-post responses can no longer replace evidence for a newly selected customer entity.

### Accessibility

- Added a reusable WAI-ARIA customer tree with one roving focus target, branch expansion,
Arrow/Home/End navigation, Enter/Space evidence activation, exact level/position metadata, and an
independently owned source-post evidence panel.
13 changes: 13 additions & 0 deletions CHANGELOG.d/external-lineage-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# External email/project lineage contract

- Add a strict, versioned external analysis contract for future Naruon and separately governed consumer use.
- Export immutable request/result types, strict parsing, canonical serialization, deterministic digests, stable errors, and the store-agnostic `analyze_external_lineage` package entry point.
- Accept only bounded caller-authorized opaque evidence references; no provider credentials, mailbox access, persistence, provider mutation, or direct application-database integration is introduced.
- Preserve caller-observed RFC/provider/manual parent relations separately from inferred reconstructed continuation.
- Exclude caller-observed children from alternative inferred-parent scoring, optional model disclosure, and inferred-pair budget while retaining them as candidate history for later records.
- Enforce available-time knowledge cutoffs and disclose excluded evidence without substituting later facts.
- Reject explicit-parent cycles and candidate-pair work above the caller-approved limit before optional LLM/provider activity.
- Expose exact active channel scores, weights, contributions, LLM availability state, proposed project groupings, and deterministic result digests.
- Add JSON Schema Draft 2020-12, one canonical ADR 0133, APA 7th doctoring, and focused TDD coverage.
- Publish `not_invoked` in the JSON Schema and ADR when an available optional
LLM has no candidate pair to judge.
52 changes: 34 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning follows
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.16.0] - 2026-08-19

### Added

- Opening an Ask Agent cited post now focuses Event Lineage and names Keyman
and evaluation as the next read. After an authorized answer, Ask Agent
names cited posts as current before that open. Home-list opens do not add
that focus or copy. No TEPP theta is invented. No cited post is invented
(ADR 0096 / ADR 0039 / ADR 0016).

## [2.15.0] - 2026-08-19

### Added

- Opening a Customer master related post now focuses Event Lineage and names
Keyman and evaluation as the next read. Customer master names authorized
customer entities as current before that open. Home-list opens do not add
that focus or copy. No TEPP theta is invented. No customer is invented
(ADR 0095 / ADR 0037 / ADR 0016).

## [2.14.0] - 2026-08-19

### Added
Expand All @@ -12,7 +32,7 @@ All notable changes to this project are documented here. Format follows
and evaluation as the next read. Calendar names authorized commitments
as current before that open. Home-list opens do not add that focus or
copy. No TEPP theta is invented. No cutoff body is invented
(ADR 0094 / ADR 0016).
(ADR 0134 / ADR 0016).

## [2.13.0] - 2026-08-19

Expand All @@ -29,7 +49,7 @@ All notable changes to this project are documented here. Format follows

- Board now names Weekly VOC as an ISO-8601 week list filter. The control
keeps Voice of Customer posts for the latest week present in the loaded
list (UTC Thursday rule) and tells the buyer to open a post to read
list (UTC Thursday rule) and tells the reader to open a post to read
Event Lineage. Reset filters returns every VOC type and every week.
No TEPP theta is invented (ADR 0092).

Expand All @@ -38,30 +58,26 @@ All notable changes to this project are documented here. Format follows
### Changed

- Renamed "Buyer" terminology to reader/workspace naming across the frontend
shell, backend evidence helpers, and living docs (ADR 0119). LineageWeave
has no explicit buyer role, so `BuyerNav`/`BuyerDestination` became
`WorkspaceNav`/`WorkspaceDestination`, `.buyer-gnb*` CSS became
`.workspace-gnb*`, and prose referring to the reading user now says
"reader" instead of "buyer". Historical ADRs and changelog entries keep
their original wording as a point-in-time record.
shell, backend evidence helpers, and living docs (ADR 0119). Historical ADRs
and changelog entries retain their point-in-time wording.

### Fixed

- Preserve source-order nested list units, numeric superscript footnotes,
HTML/OOXML table rows, and recognizable Markdown table rows across the
semantic-unit parser and reader body renderer. See the [product and
technical gap baseline](docs/product-technical-gap-baseline.md) and
[ADR 0103](docs/adr/0103-semantic-document-evidence-contract.md).
- Preserve multiline VISION table rows, render parent and region OCR tables
accessibly, and request source-visible entity, relationship, layout, and
document-purpose evidence instead of a generic image caption. VISION calls
now share the structure channel's 600-second deep-agent runtime boundary;
an empty same-image retry can no longer erase previously observed OCR.
- Removed the completed one-shot Global Ask package-manager repair workflow;
normal product CI remains the only branch validation path.
- `make smoke` and `make seed` now run through the locked project `uv`
environment, so local OIDC and synthetic-data workflows resolve the same
pinned dependencies as CI.
- The workspace Event Lineage global Search action now retries focus after the
board finishes loading, so navigation from Customer master, Calendar, or
Ask Agent lands the cursor in the search box. The handled request is consumed,
so later board navigation does not steal focus, and Search closes an open
mobile drawer like every other destination change.
- Mobile Event Lineage evidence cards now read their translated column labels
from the rendered cells instead of hardcoded English CSS, and the two drawer
close controls have distinct accessible names.
- Event Lineage SVG edges now retain their instance-specific direction markers,
so parent-to-child arrows remain visible when multiple lineage groups render.
- All OpenAI-compatible chat-completion consumers now validate the shared
response envelope before parsing it, preventing malformed provider bodies
from escaping as raw `KeyError` or response-shape details.
Expand Down
17 changes: 15 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,23 @@ ISO-8601 week stay; other VOC types and older weeks drop out. The Board
names Event Lineage as the next read (ADR 0092). Open a remaining post:
Event Lineage takes focus and names Keyman and evaluation next
(ADR 0093). A home-list open does not. Do not invent a theta.

## Calendar open (v2.14.0)

Open Calendar. Authorized commitments are current. Open a commitment:
Event Lineage takes focus and names Keyman and evaluation next
(ADR 0094). A home-list open does not. Do not invent a theta or a
(ADR 0134). A home-list open does not. Do not invent a theta or a
CalDAV event.

## Customer master open (v2.15.0)

Open Customer master. Authorized customer entities are current. Open a
related post: Event Lineage takes focus and names Keyman and evaluation
next (ADR 0095). A home-list open does not. Do not invent a theta or a
customer.

## Ask Agent open (v2.16.0)

Open Ask Agent. After an authorized answer, cited posts are current. Open
a cited post: Event Lineage takes focus and names Keyman and evaluation
next (ADR 0096). A home-list open does not. Do not invent a theta or a
cited post.
50 changes: 23 additions & 27 deletions backend/app/analysis_run_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import hashlib
import json
from datetime import datetime, timezone
from datetime import UTC, datetime
from typing import Any
from uuid import UUID

Expand All @@ -21,15 +21,15 @@
AnalysisRunCreateError,
fetch_visible_analysis_run,
)
from backend.app.post_eligibility import SOURCE_POST_ELIGIBILITY_SQL
from backend.app.analysis_run_outbox import (
latest_outbox_delivery_is_claimed,
latest_outbox_delivery_is_delivered,
outbox_request_digest,
)
from backend.app.lineage_ingestion import records_from_source_posts
from backend.app.post_eligibility import SOURCE_POST_ELIGIBILITY_SQL
from lineageweave.adjudication_client import AdjudicationClient
from lineageweave.http_client import HttpClientError, post_json
from lineageweave.http_client import post_json
from lineageweave.lineage_persistence import lineage_edge_specs
from lineageweave.models import Edge
from lineageweave.tepp_client import AnalysisRunRequest, TeppClient, TeppNotAvailable
Expand Down Expand Up @@ -103,8 +103,8 @@ def transport(payload: dict[str, Any]) -> dict[str, Any]:
try:
headers = {"authorization": f"Bearer {api_key}"} if api_key.strip() else {}
return post_json(url, payload, headers=headers, timeout=30.0)
except (HttpClientError, OSError, ValueError, TypeError) as exc:
raise TeppNotAvailable("TEPP transport unavailable") from exc
except Exception as exc:
raise TeppNotAvailable("TEPP transport request failed") from exc

return TeppClient(transport=transport)

Expand All @@ -119,12 +119,12 @@ def tepp_run_request(
"""Build TEPP's published request from the frozen run, never a theta."""
cutoff = knowledge_cutoff
if cutoff.tzinfo is None:
cutoff = cutoff.replace(tzinfo=timezone.utc)
cutoff = cutoff.replace(tzinfo=UTC)
return AnalysisRunRequest(
idempotency_key=idempotency_key,
tenant_workspace_id=str(corporate_entity_id),
snapshot_id=snapshot_sha256,
knowledge_cutoff=cutoff.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
knowledge_cutoff=cutoff.astimezone(UTC).strftime("%Y-%m-%dT%H:%M:%SZ"),
model_contract_version=_TEPP_MODEL_CONTRACT,
output_profile=_TEPP_OUTPUT_PROFILE,
)
Expand Down Expand Up @@ -610,7 +610,7 @@ async def deliver_queued_analysis_run(
return await _visible_or_404(
conn, analysis_run_id, account_id, affiliated_entity_ids
)
now = datetime.now(timezone.utc)
now = datetime.now(UTC)
try:
if not latest_outbox_delivery_is_claimed(latest):
await _append_outbox_delivery(
Expand All @@ -636,9 +636,8 @@ async def deliver_queued_analysis_run(
affiliated_entity_ids=affiliated_entity_ids,
adjudication_client=adjudication_client,
)
finished = datetime.now(timezone.utc)
if finished < now:
finished = now
finished = datetime.now(UTC)
finished = max(finished, now)
await _append_outbox_delivery(
conn,
analysis_run_id,
Expand Down Expand Up @@ -699,7 +698,7 @@ async def _deliver_lineage_reconstruction(
adjudication_client: AdjudicationClient | None = None,
) -> None:
"""Persist ThreadWeave parent choices for the frozen bag."""
now = datetime.now(timezone.utc)
now = datetime.now(UTC)
member_rows = await _snapshot_member_posts(
conn,
locked["analysis_source_snapshot_id"],
Expand All @@ -715,9 +714,8 @@ async def _deliver_lineage_reconstruction(
)
edges = lineage_edge_specs(records_from_source_posts(rows), llm=adjudication_client)
digest = reconstruction_result_digest(edges)
finished = datetime.now(timezone.utc)
if finished < now:
finished = now
finished = datetime.now(UTC)
finished = max(finished, now)
await conn.execute(
"""
insert into analysis_run_reconstruction
Expand Down Expand Up @@ -759,25 +757,23 @@ async def _deliver_tepp_measurement(
tepp_client: TeppClient,
) -> None:
"""Submit the frozen snapshot through ``tepp_client``. Never persist a theta."""
now = datetime.now(timezone.utc)
now = datetime.now(UTC)
request = tepp_run_request(
idempotency_key=str(locked["idempotency_key"]),
snapshot_sha256=str(locked["snapshot_sha256"]),
knowledge_cutoff=locked["knowledge_cutoff"],
corporate_entity_id=str(locked["corporate_entity_id"]),
)
status_code, failure_code, envelope = _tepp_submission(tepp_client, request)
if status_code == _SUCCEEDED and envelope is not None:
if not await _persist_tepp_result(
conn,
analysis_run_id=analysis_run_id,
envelope=envelope,
):
status_code = _FAILED
failure_code = "tepp_result_not_persisted"
finished = datetime.now(timezone.utc)
if finished < now:
finished = now
if status_code == _SUCCEEDED and envelope is not None and not await _persist_tepp_result(
conn,
analysis_run_id=analysis_run_id,
envelope=envelope,
):
status_code = _FAILED
failure_code = "tepp_result_not_persisted"
finished = datetime.now(UTC)
finished = max(finished, now)
await _append_status(
conn,
analysis_run_id,
Expand Down
Loading