-
Notifications
You must be signed in to change notification settings - Fork 1
feat(calendar): publish clean Naruon event projection contract #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 42 commits into
main
from
feat/naruon-calendar-projection-contract-main
Aug 25, 2026
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
c31e083
test(calendar): define clean Naruon projection contract
seonghobae 924e868
test(http): require bounded JSON response reads
seonghobae 5282dc6
fix(http): bound admitted JSON response bodies
seonghobae dc42c3a
feat(calendar): add bounded Naruon read projection
seonghobae 1e54243
test(calendar): cover transport and numeric hardening
seonghobae 796b758
docs(contract): add strict Naruon calendar schema
seonghobae ccdbdbf
feat(calendar): export Naruon projection package API
seonghobae 0aa9b8f
docs(adr): correct pseudo-CalDAV product language
seonghobae 2914b8b
docs(adr): record clean Naruon calendar authority boundary
seonghobae c25c5de
docs(doctoring): trace calendar contract standards
seonghobae da1d029
docs(changelog): add clean calendar projection fragment
seonghobae 10bdeb0
test(http): cover bounded response edge branches
seonghobae 1a22148
test(calendar): cover RFC3339 defensive branches
seonghobae abd2401
docs(plan): add calendar contract TDD plan
seonghobae d808690
test(calendar): reject surrounding contract whitespace
seonghobae fd614aa
fix(calendar): reject silent contract string normalization
seonghobae 364dd66
docs(contract): align exact string whitespace rules
seonghobae cc54f8c
test(http): require exact JSON response media type
seonghobae 51f10d0
fix(http): validate exact response media types
seonghobae 8156ed8
fix(calendar): require exact provider response media type
seonghobae 72c3fa1
test(calendar): assert response media-type enforcement
seonghobae de0b453
docs(contract): add calendar consumer conformance fixture
seonghobae 7fa401d
test(calendar): pin consumer conformance fixture digest
seonghobae 0360fea
fix: contain raw provider failures
seonghobae b566c6d
fix: preserve login return URL and guard admin token
seonghobae b606c25
fix: degrade malformed chat provider replies (#379)
seonghobae 26f25ac
fix(docs,worker): free ADR 0123 collision and stop mislabeling empty-…
seonghobae de7f78c
docs(adr): assign Naruon calendar ADR 0145
seonghobae dd463ed
Revert "fix: preserve login return URL and guard admin token"
seonghobae b4d94cd
test: prove bounded calendar transport edges
seonghobae 6fc22a9
Reapply "fix: preserve login return URL and guard admin token"
seonghobae 2f3f308
fix(worker): restore diagnostic log for empty-body ingestion skip
seonghobae 4086138
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 0f86e66
fix(docs): renumber Naruon calendar ADR from 0145 to 0168
seonghobae 24448af
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 569e8ae
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 3d91091
Merge remote-tracking branch 'origin/main' into feat/naruon-calendar-…
seonghobae 5be1e09
fix(docs): free pre-existing ADR 0168 collision on main
seonghobae 15d5af2
Merge remote-tracking branch 'origin/main' into codex/pr355-repair
seonghobae 83145dd
fix(calendar): reconcile current main review findings
seonghobae 0a2a72c
fix(ingestion): fail empty bodies without retry
seonghobae 761fdfe
fix(adr): allocate Naruon decision 0203
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Naruon calendar projection contract | ||
|
|
||
| ## Added | ||
|
|
||
| - Add a strict, bounded v1 consumer contract for calendar occurrences already authorized and policy-filtered by Naruon, including occurrence identity, provider revision, timezone/all-day semantics, disclosure level, and observed provenance. | ||
| - Export the projection parser, immutable result types, media type, schema version, and read client through the public LineageWeave package surface. | ||
| - Add a reusable bounded JSON response read so oversized pages are rejected before allocation and parsing. | ||
|
|
||
| ## Changed | ||
|
|
||
| - Clarify that LineageWeave owns post-grounded commitments and issue/todo records, while Naruon owns provider CalDAV synchronization, revisions, writeback, retry, and reconciliation. | ||
| - Replace the misleading CalDAV label on the earlier custom JSON `/events` feed with an explicit pseudo-CalDAV correction. | ||
|
|
||
| ## Security | ||
|
|
||
| - Reject unsafe base URLs, whitespace/control-bearing service tokens, unbounded response bodies, invalid numeric controls, oversized pages/windows, naive timestamps, duplicate occurrences, unknown fields/vocabularies, and URL-shaped opaque references. |
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,53 @@ | ||
| # ADR 0038: Separate CalDAV events from internal commitments | ||
| # ADR 0038: Separate external calendar events from internal commitments | ||
|
|
||
| - Status: Accepted | ||
| - Status: Superseded in part by ADR 0203 | ||
| - Date: 2026-08-18 | ||
|
|
||
| ## Context | ||
|
|
||
| The buyer Calendar destination needs both external calendar events and | ||
| The buyer Calendar destination needs both external calendar observations and | ||
| actionable records derived from LineageWeave posts. They have different | ||
| ownership and evidence boundaries. PR #251 defines CalDAV as an independent | ||
| consumer port, while the current application already stores authorized | ||
| commitments and issue tickets. | ||
| ownership and evidence boundaries. The application already stores authorized | ||
| commitments and issue tickets, while the first external adapter read a custom | ||
| JSON `GET {CALDAV_BASE_URL}/events` feed. | ||
|
|
||
| ## Decision | ||
| That feed was not a CalDAV client or server contract. It did not implement RFC | ||
| 4791 WebDAV discovery/REPORT, RFC 5545 recurrence and timezone semantics, RFC | ||
| 6578 synchronization, provider revisions, or provider authorization. Product | ||
| and code language must not represent it as shipped CalDAV interoperability. | ||
|
|
||
| `GET /api/calendar` returns two independent collections: | ||
| ## Original decision retained | ||
|
|
||
| - `events`: events read from `CALDAV_BASE_URL/events` through | ||
| `lineageweave.caldav_client`; malformed external rows are ignored. | ||
| The Buyer Calendar returns two independent collections: | ||
|
|
||
| - `events`: externally observed calendar occurrences; and | ||
| - `commitments`: the existing authorized internal commitment projection, | ||
| filtered by the requesting account's `post_read` RBAC and post ABAC rules. | ||
|
|
||
| When CalDAV is unset or temporarily unavailable, `events` is empty and the | ||
| response includes a next action in `calendar_sources`; the internal | ||
| commitments remain available. The backend never invents an external event. | ||
| When the external calendar channel is unset or temporarily unavailable, | ||
| `events` is empty and the internal commitments remain available. The backend | ||
| never invents an external event. | ||
|
|
||
| LineageWeave does not add a second calendar database, CalDAV server, provider | ||
| credential store, or writeback engine. | ||
|
|
||
| ## Superseding decision | ||
|
|
||
| ADR 0203 replaces the custom `/events` transport and CalDAV naming with a | ||
| versioned, read-only Naruon calendar projection contract. Naruon is the authority | ||
| for customer-owned provider access, source registry, synchronization, provider | ||
| revisions, writeback, retries, and reconciliation. LineageWeave consumes only | ||
| bounded, already-authorized `observed` occurrence projections. | ||
|
|
||
| This checkpoint does not add a second calendar database. A persistent event | ||
| store and sync history may be added when offline access, change tracking, or | ||
| CalDAV write-back becomes a product requirement. | ||
| The original separation between `events` and `commitments` remains mandatory. | ||
| An external event is not converted to an internal issue or commitment without a | ||
| separate source-grounded LineageWeave decision and evidence trail. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - The Calendar screen is useful with the existing synthetic commitment data, | ||
| even without an external calendar server. | ||
| - External events cannot be mistaken for post-grounded commitments. | ||
| - CalDAV transport failures do not turn the entire buyer surface into a | ||
| fail-closed blank screen. | ||
| - The Calendar remains useful with authorized commitment data when Naruon is | ||
| unavailable. | ||
| - External observations cannot be mistaken for post-grounded commitments. | ||
| - Product documentation no longer represents a custom JSON feed as CalDAV. | ||
| - Runtime activation waits for Naruon's matching read endpoint and service | ||
| audience; absence continues to fail closed rather than fabricate events. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.