Repository navigation
Add read-only Confluence document identity - #37
Merged
Merged
Conversation
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.
Summary
Implements Milestone 7 PR B only: selected ChangeOps enterprise documents can now carry a
validated, persisted, read-only Confluence Cloud page identity. The bounded production
configuration supports only the Manager Travel Approval Guide.
No live credential or page ID exists in the repository. The implementation was first verified with
captured provider fixtures and mocked CI tests, then live-validated against the environment-only
Acme Manager Travel Approval Guide configuration. No placeholder or real page ID is present in
production code.
Persistence design
confluence_document_sources, a Confluence-specific one-to-one child keyed by the existingenterprise_documents.id.fingerprints, evidence, paths, and actions.
ID/key, external version/status, source-updated time, imported/refreshed times, SHA-256 source
fingerprint, and the latest safe refresh outcome.
outcome fields and never overwrites last-known-good metadata.
already_current; successful changed metadataupdates only the Confluence child row.
0013_confluence_document_sourcesupgrades, downgrades, and upgrades cleanly.Confluence adapter boundary
GET /wiki/api/v2/pages/{id}?include-version=trueGET /wiki/api/v2/spaces/{spaceId}timeout, and the account's existing page/space view permissions.
read:page:confluenceandread:space:confluence.field bounds, and response shape.
provider unavailable, validation failure, ambiguous response, success, and already current.
synchronization.
API changes
POST /api/v1/catalog-objects/enterprise_document/{document_id}/confluence-refreshexternal_source_stateexternal_sourcemetadata when importedserver environment; clients cannot submit arbitrary pages.
UI changes
Open in Confluence.
disclosure.
authorization UI.
Configuration
Documented in
.env.example,compose.yaml, andREADME.md:CONFLUENCE_BASE_URLCONFLUENCE_EMAILCONFLUENCE_API_TOKENCONFLUENCE_TIMEOUT_SECONDSCONFLUENCE_MANAGER_TRAVEL_APPROVAL_GUIDE_PAGE_IDThe README includes exact manual Acme page creation, least-permission account setup, refresh, and
verification steps. Credentials and the real page ID remain uncommitted.
Tests run
ruff check src tests migrationsruff format --check src tests migrationsnpm run typechecknpm run lintnpm run buildupgrade head -> downgrade -1 -> upgrade headcurrent --check-headsFixture-backed coverage includes adapter parsing, all required failure states, persistence,
idempotency, metadata-only updates, external-identity retarget rejection, API contracts,
last-known-good preservation, demo reset, frontend imported/unavailable/stale states, unchanged
typed relationships, and unchanged assessment fingerprint/counts.
Screenshots
Live-imported reviewer state (environment-only configuration; no credential or page ID is committed):
Fixture-imported reviewer state (the external identifiers shown are test fixtures, not production
configuration):
Honest unconfigured state:
Responsive mobile state:
Known limitations
adapter implements only GET requests; the broader credential is an explicitly accepted
current-environment limitation, so the demo does not claim end-to-end least privilege.
authorization flow is introduced.
editing, publishing, or delete operation is included.
Boundary confirmations
deterministic ChangeOps data.
fixture tests prove the same input fingerprint, worker classifications, impact identities,
18-impact summary, and 13 proposed actions before and after refresh.
analysis, workflow, persistence, and audit lineage.
editing, or AI proposals are included.
Follow-up work
end-to-end least privilege.
experience still needs it.