Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ v0.88.0). Do not invent a theta.
Opening a cutoff-rewritten title shows **Body this run knew** from
`source_post_revision` beside the live rewrite (ADR 0025 / v2.1.0).
Do not invent the earlier sentence when no revision covers the cutoff.
After `make seed`, the January 12 Demo Corp lineage and TEPP runs list
Demo public post and do not list Late Demo public post (2026-01-13).
The live post list still shows Late Demo (ADR 0016).

A corporate-entity similarity result has three outcomes: unique, miss,
or tie (ADR 0026). A tie is not a miss. Keep the organization name
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.d/2.12.3-late-demo-cutoff-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 2.12.3 Late Demo public post

Seed inserts Late Demo public post after the January 12 knowledge
cutoff so the ADR 0016 list filter has a falsifiable own-corp
counter-example. No second cutoff implementation. TEPP honesty
unchanged.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ 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.12.3] - 2026-08-18

### Added

- `make seed` inserts Late Demo public post (2026-01-13) so the
January 12 Demo Corp lineage and TEPP runs' knowledge cutoff is
falsifiable: Demo public post still opens; Late Demo does not.
The live post list still shows Late Demo. The cutoff filter
itself already lives on this stack (ADR 0016). TEPP honesty is
unchanged: accepted acks stay Failed transport evidence, not
Succeeded. Never invent a theta.

## [2.12.2] - 2026-08-18

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ after cutoff were rewritten after the run; the opened body names
both clocks and shows **Body this run knew** beside the live
rewrite. Compare those two texts before treating the live body as
reconstructed evidence (ADR 0016 / 0025).
The January 12 Demo Corp lineage and TEPP runs list Demo public post
and do not list Late Demo public post (2026-01-13). The live post
list still shows Late Demo.
`POST /api/analysis-runs` records Pending lineage only on an
authorized cutoff capture (ADR 0017). TEPP and period-report kinds
are 422. The Request button waits until affiliated corps load; choose
Expand Down
12 changes: 10 additions & 2 deletions docs/adr/0016-analysis-run-knowledge-cutoff-posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ run.
## Consequences

- After `make seed`, the Demo Corp lineage run lists Demo public post
and other in-cutoff Demo Corp titles. The later fixture account-review
post (2026-02-10) does not appear.
and other in-cutoff Demo Corp titles. Late Demo public post
(2026-01-13) and the later fixture account-review post (2026-02-10)
do not appear. The live post list still shows Late Demo.
- Open the run: Demo public post is marked updated after cutoff
(`updated_at` 2026-01-13). Demo private post is not.
- Open a marked title: the popup shows **Body this run knew** from
Expand All @@ -62,6 +63,13 @@ run.
(ADR 0018). A later public post cannot surface a previously hidden
thread-group run.

## Follow-up — v2.12.3 Late Demo own-corp counter-example

v2.12.3 seeds Late Demo public post on 2026-01-13 so the January 12
Demo Corp lineage and TEPP runs can prove the existing
`created_at <= knowledge_cutoff` filter. This is not a second cutoff
and does not change TEPP honesty.

## References

International Organization for Standardization. (2019). *ISO 8601-1:2019:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "2.12.2",
"version": "2.12.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion lineageweave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"sentence_excerpts",
]

__version__ = "2.12.2"
__version__ = "2.12.3"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lineageweave"
version = "2.12.2"
version = "2.12.3"
description = "Reconstructs git-branch-style lineage DAGs from scattered short records using multi-channel score fusion and LLM adjudication."
readme = "README.md"
license = { text = "MIT" }
Expand Down
84 changes: 74 additions & 10 deletions scripts/seed_demo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@
)
CALENDAR_TICKET_TITLE = "Send Riverbend the revised delivery schedule."

# ADR 0016: Demo Corp lineage/TEPP runs use this analysis clock. Late Demo
# public post is the own-corp counter-example dated after that clock.
DEMO_PUBLIC_POST_TITLE = "Demo public post"
DEMO_PUBLIC_POST_CREATED_AT = "2026-01-10T12:00:00Z"
DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF = "2026-01-12T12:00:00Z"
LATE_DEMO_PUBLIC_POST_TITLE = "Late Demo public post"
LATE_DEMO_PUBLIC_POST_CREATED_AT = "2026-01-13T09:00:00Z"
LATE_DEMO_PUBLIC_POST_BODY = (
"Written after the Demo Corp lineage-run knowledge cutoff."
)


def _fetch_demo_user_subjects(base_url: str, admin_user: str, admin_password: str) -> dict[str, str]:
"""Return {username: Keycloak subject id} for the two synthetic demo users."""
Expand Down Expand Up @@ -278,19 +289,23 @@ def seed(
"the January cutoff: Priya Nair at Northridge Grid now expects "
"a later delivery window."
)
cur.execute("select post_id, post_body from source_post where post_title = 'Demo public post'")
cur.execute(
"select post_id, post_body from source_post where post_title = %s",
(DEMO_PUBLIC_POST_TITLE,),
)
demo_public_row = cur.fetchone()
if demo_public_row is None:
cur.execute(
"insert into source_post (author_account_id, corporate_entity_id, process_unit_id, post_title, post_body, voc_type_code, visibility_code, created_at, updated_at) "
"values (%s, %s, %s, 'Demo public post', "
"values (%s, %s, %s, %s, "
"%s, "
"'voc', 'public', '2026-01-10T12:00:00Z', '2026-01-10T12:00:00Z') "
"returning post_id",
(
account_ids["demo.analyst"],
corporate_entity_id,
process_units["DEMO-PU-A"],
DEMO_PUBLIC_POST_TITLE,
demo_public_cutoff_body,
),
)
Expand Down Expand Up @@ -341,6 +356,12 @@ def seed(
"updated_at = '2026-01-10T12:00:00Z' "
"where post_title = 'Demo private post'"
)
seed_late_demo_public_post(
cur,
account_ids["demo.analyst"],
corporate_entity_id,
process_units["DEMO-PU-A"],
)
cur.execute(
"insert into post_counterparty_entity (post_id, counterparty_entity_name, relationship_type_code) "
"values (%s, 'Northridge Grid', 'rel_voc'), (%s, 'Demo Corp', 'rel_voc') "
Expand Down Expand Up @@ -446,6 +467,45 @@ def seed(
conn.close()


def seed_late_demo_public_post(
cur,
author_account_id,
corporate_entity_id,
process_unit_id,
) -> None:
"""Insert Late Demo public post after the January 12 knowledge cutoff.

ADR 0016 already filters ``source_post.created_at <= knowledge_cutoff``.
This own-corp public post is the falsifiable counter-example: Demo
public post stays on the January 12 Demo Corp lineage and TEPP run
lists; Late Demo does not. The live post list still shows Late Demo.
Does not implement a second cutoff, invent a theta, or stamp TEPP
Succeeded.
"""
cur.execute(
"select post_id from source_post where post_title = %s",
(LATE_DEMO_PUBLIC_POST_TITLE,),
)
if cur.fetchone() is not None:
return
cur.execute(
"insert into source_post ("
"author_account_id, corporate_entity_id, process_unit_id, "
"post_title, post_body, voc_type_code, visibility_code, "
"created_at, updated_at"
") values (%s, %s, %s, %s, %s, 'voc', 'public', %s, %s)",
(
author_account_id,
corporate_entity_id,
process_unit_id,
LATE_DEMO_PUBLIC_POST_TITLE,
LATE_DEMO_PUBLIC_POST_BODY,
LATE_DEMO_PUBLIC_POST_CREATED_AT,
LATE_DEMO_PUBLIC_POST_CREATED_AT,
),
)


def insert_fixture_source_posts(cur, author_account_id, corporate_entity_id, process_unit_id):
"""Insert ``sample_records()`` as ``source_post`` rows seed and rebuild share.

Expand Down Expand Up @@ -707,7 +767,7 @@ def _seed_fixture_evaluations(cur) -> None:
from lineageweave.fixtures import ambiguous_commitment_post, sample_records
from lineageweave.post_evaluation import RUBRIC_VERSION

titles = ["Demo public post", ambiguous_commitment_post()[0]]
titles = [DEMO_PUBLIC_POST_TITLE, ambiguous_commitment_post()[0]]
titles.extend(rec.label for rec in sample_records())
for title in titles:
cur.execute("select post_id from source_post where post_title = %s", (title,))
Expand Down Expand Up @@ -1451,14 +1511,15 @@ def _seed_demo_analysis_run(cur, requested_by_account_id, corporate_entity_id) -
configuration_schema_version, configuration_sha256,
code_revision_sha, requested_at)
values (%s, 'analysis_run_lineage', %s,
%s, '2026-01-12T12:00:00Z', 'lineage-run-v1', %s, %s,
%s, %s, 'lineage-run-v1', %s, %s,
'2026-01-12T12:30:00Z')
returning analysis_run_id
""",
(
snapshot_id,
DEMO_LINEAGE_IDEMPOTENCY_KEY,
requested_by_account_id,
DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
"b" * 64,
"c" * 40,
),
Expand Down Expand Up @@ -1528,7 +1589,7 @@ def _seed_demo_run_reconstruction(cur, analysis_run_id, corporate_entity_id) ->
and created_at <= %s
order by created_at, post_title
""",
(corporate_entity_id, datetime(2026, 1, 12, 12, 0, tzinfo=timezone.utc)),
(corporate_entity_id, DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF),
)
columns = [desc[0] for desc in cur.description]
rows = [dict(zip(columns, row)) for row in cur.fetchall()]
Expand Down Expand Up @@ -1564,7 +1625,7 @@ def tepp_seed_request() -> AnalysisRunRequest:
idempotency_key=DEMO_TEPP_IDEMPOTENCY_KEY,
tenant_workspace_id="demo-workspace",
snapshot_id=demo_source_snapshot_sha256(),
knowledge_cutoff="2026-01-12T12:00:00Z",
knowledge_cutoff=DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
model_contract_version="tepp-analysis-run-v1",
output_profile="calibrated_event_measurement",
)
Expand Down Expand Up @@ -1637,14 +1698,15 @@ def _seed_demo_tepp_run(cur, requested_by_account_id, corporate_entity_id) -> No
configuration_schema_version, configuration_sha256,
code_revision_sha, requested_at)
values (%s, 'analysis_run_tepp', %s,
%s, '2026-01-12T12:00:00Z', 'tepp-run-v1', %s, %s,
%s, %s, 'tepp-run-v1', %s, %s,
'2026-01-12T12:34:00Z')
returning analysis_run_id
""",
(
snapshot_id,
DEMO_TEPP_IDEMPOTENCY_KEY,
requested_by_account_id,
DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
"d" * 64,
"e" * 40,
),
Expand Down Expand Up @@ -1686,7 +1748,7 @@ def tepp_accepted_seed_request() -> AnalysisRunRequest:
idempotency_key=DEMO_TEPP_SUCCEEDED_IDEMPOTENCY_KEY,
tenant_workspace_id="demo-workspace",
snapshot_id=demo_source_snapshot_sha256(),
knowledge_cutoff="2026-01-12T12:00:00Z",
knowledge_cutoff=DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
model_contract_version="tepp-analysis-run-v1",
output_profile="calibrated_event_measurement",
)
Expand Down Expand Up @@ -1722,14 +1784,15 @@ def _seed_demo_accepted_tepp_run(cur, requested_by_account_id, corporate_entity_
configuration_schema_version, configuration_sha256,
code_revision_sha, requested_at)
values (%s, 'analysis_run_tepp', %s,
%s, '2026-01-12T12:00:00Z', 'tepp-run-v1', %s, %s,
%s, %s, 'tepp-run-v1', %s, %s,
'2026-01-12T12:42:00Z')
returning analysis_run_id
""",
(
snapshot_id,
DEMO_TEPP_SUCCEEDED_IDEMPOTENCY_KEY,
requested_by_account_id,
DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
"c" * 64,
"b" * 40,
),
Expand Down Expand Up @@ -1823,14 +1886,15 @@ def _seed_demo_report_run(cur, requested_by_account_id, corporate_entity_id) ->
configuration_schema_version, configuration_sha256,
code_revision_sha, requested_at)
values (%s, 'analysis_run_report', %s,
%s, '2026-01-12T12:00:00Z', 'report-run-v1', %s, %s,
%s, %s, 'report-run-v1', %s, %s,
'2026-01-12T12:38:00Z')
returning analysis_run_id
""",
(
snapshot_id,
DEMO_REPORT_IDEMPOTENCY_KEY,
requested_by_account_id,
DEMO_ANALYSIS_RUN_KNOWLEDGE_CUTOFF,
"f" * 64,
"a" * 40,
),
Expand Down
Loading