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
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Report a reproducible problem in Sync Web
title: ""
labels: bug
assignees: ""
---

## What happened?

Describe the problem clearly.

## Expected behavior

What did you expect to happen?

## Steps to reproduce

1.
2.
3.

## Environment

- Sync Web version / image tag / commit SHA:
- Deployment mode: general Compose / ledger binary / local test compose / other
- Runtime and OS: Docker / Podman / macOS / Linux / Windows / other
- Affected area: journal / records / gateway / explorer / WebDAV file-system / ledger / agent-recorder / docs / other
- Was an existing journal database updated with `JOURNAL_UPDATE=1`? yes / no / unknown

## Logs or output

Paste relevant logs, command output, or screenshots. Redact secrets, tokens, private keys, and private journal data.

## Security note

If this report may involve a vulnerability or sensitive data exposure, do not file a public issue. Follow `SECURITY.md` instead.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Feature request
about: Suggest a Sync Web improvement
title: ""
labels: enhancement
assignees: ""
---

## Problem or use case

What problem should this solve? Who is it for?

## Proposed behavior

Describe the desired behavior or interface.

## Affected areas

Check or list the areas likely involved:

- [ ] records / Scheme object layer
- [ ] journal / Rust SDK
- [ ] gateway / API
- [ ] explorer / UI
- [ ] WebDAV file-system
- [ ] ledger binary / deployment
- [ ] agent-recorder
- [ ] docs
- [ ] other:

## Compatibility and deployment concerns

Does this affect existing data, public APIs, record updates, container deployment, release artifacts, or bridge behavior?

## Alternatives considered

Describe any alternatives or workarounds.
44 changes: 44 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Summary

-
-
-

## Testing

- [ ] `node scripts/sync-platform-package-versions.js`
- [ ] Records tests, if records changed: `./records/tests/test.sh ./journal/target/debug/journal-sdk`
- [ ] Explorer tests/build, if Explorer changed: `cd services/explorer && npm test -- --watchAll=false && npm run build`
- [ ] Gateway tests, if Gateway changed: `cd services/gateway && npm test -- --runInBand`
- [ ] Docs build, if docs changed: `cd docs/info && npm run build`
- [ ] Agent recorder tests, if agent-recorder changed: `cd tools/agent-recorder && cargo test`

Other checks run:

```text

```

## Versioning

- [ ] Root `VERSION` bumped, or not needed because:
- [ ] Package versions synced with `node scripts/sync-platform-package-versions.js --write`, or not needed because:
- [ ] `journal/Cargo.toml` version changed only if the journal-sdk crate changed, or not applicable
- [ ] `tools/agent-recorder/Cargo.toml` version bumped for Agent Recorder-only release-worthy changes, or not applicable

## Deployment / records impact

- [ ] No record changes, or existing deployments require `JOURNAL_UPDATE=1`
- [ ] No runtime-managed admin/config state will be reset by updates
- [ ] Public deployment variables and defaults remain safe (`ORIGIN`, `INTERFACE`, `JOURNAL_NAME`, secrets)
- [ ] No destructive volume/data commands are added or documented without explicit warnings

## Security / release notes

- [ ] No secrets, private data, local databases, generated caches, or runtime artifacts committed
- [ ] Release/container/binary artifact implications considered
- [ ] Security-sensitive changes are described here or handled privately via `SECURITY.md`

## Notes / risks

-
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 1.4.3

### Changed

- **Journal interface defaults** — General Compose now derives the raw journal interface endpoint from `ORIGIN` instead of ever falling back to `SECRET`, and passes `ORIGIN`, `INTERFACE`, and `JOURNAL_NAME` into the journal container.
- **Admin update behavior** — `JOURNAL_UPDATE=1` preserves the existing runtime-managed admin list instead of reseeding it from `INTERFACE_ADMINS`.
- **Bridge admin UI polish** — Shortened the bridge creation button to “Create” and aligned selected Push/Pull/None segment color with the page’s primary button color.

## 1.4.2

### Added

- **Bridge admin controls** — Added Explorer admin controls for subscribing to peers and publishing to peers, including endpoint editing, delete actions, and Push/Pull/None policy selection.
- **Bridge delete operations** — Added explicit incoming bridge and outgoing subscriber delete operations through the interface and gateway.
- **Version-driven ledger releases** — Ledger and journal-sdk release artifacts are now published from main `VERSION` changes, using `VERSION` as the release source of truth.

### Changed

- **Bridge configuration** — Disabled bridge and subscriber entries are preserved as `none` tombstones, while delete removes the config entry.
- **Bridge identity defaults** — Ledger public config now stores the journal name so Explorer can autofill the remote name when creating publishing relationships.
- **Idea docs** — Consolidated current cross-journal data-flow notes and removed stale/superseded idea documents.

### Fixed

- **Stale bridge endpoints** — Explorer now prefers authoritative bridge interface config over legacy local registration snapshots.
- **Bridge sync loop** — Incoming bridges with negotiated `none` policy are skipped during periodic bridge synchronization.

## 1.4.1

### Added
Expand Down
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

This repository is the Synchronic Web monorepo. Prefer small, focused pull requests with clear testing notes.

## Versioning and releases

- Pull requests that change the platform/runtime should bump the root `VERSION`.
- Agent Recorder-only release-worthy changes should bump `tools/agent-recorder/Cargo.toml` instead of the root `VERSION`.
- After changing root `VERSION`, run:
```sh
node scripts/sync-platform-package-versions.js --write
```
and commit the resulting package metadata updates.
- Only bump `journal/Cargo.toml` when the `journal-sdk` crate itself changes.
- Root `VERSION` is the source of truth for platform container tags and ledger binary releases. Agent Recorder has its own release/version stream. Do not mutate existing release assets; publish a new patch version instead.

## Testing

Run the checks relevant to your change and list them in the PR body. Common checks:

```sh
./records/tests/test.sh ./journal/target/debug/journal-sdk
node scripts/sync-platform-package-versions.js
cd services/explorer && npm test -- --watchAll=false && npm run build
cd services/gateway && npm test -- --runInBand
cd docs/info && npm run build
cd tools/agent-recorder && cargo test
```

Use `~/.cargo/bin/cargo` if `cargo` is not on your local `PATH`.

## Records and Scheme changes

- Read `records/LANGUAGE.md` before changing `records/lisp/*.scm`.
- Preserve public method names, argument shapes, return shapes, and sentinel behavior unless the change is intentionally breaking.
- Keep durable semantic state in sync-node object state, not only in live Scheme bindings.
- Mutating a live object does not persist it into a parent/root automatically; persist the returned object node where needed.
- Add or update `records/tests` for public method changes, state-layout changes, authorization changes, bridge behavior, and persistence-sensitive mutations.

## Deployment-sensitive changes

- Treat `deploy/compose/general/` as a production path, not just local scaffolding.
- Avoid documenting or scripting `down -v` casually; it destroys deployment data.
- Existing journal databases require `JOURNAL_UPDATE=1` to load updated mounted record code. Use it intentionally and turn it back off after the update.
- Runtime-managed admin state must not be reset by record updates; environment admin lists are seed inputs for fresh installs.
- Public deployments should set `ORIGIN`, and may set `INTERFACE` and `JOURNAL_NAME`; never derive public identity fields from secrets.
- Preserve both Docker and Podman/Compose-compatible workflows where practical.

## Pull request notes

A useful PR body includes:

- **Summary** — what changed and why.
- **Testing** — commands run, or `Not run` with reason.
- **Notes/Risks** — deployment, migration, compatibility, security, or follow-up concerns.
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MIT License

Copyright (c) 2024 National Technology & Engineering Solutions of
Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
NTESS, the U.S. Government retains certain rights in this software.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 changes: 26 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Security Policy

Please do not open public issues for suspected vulnerabilities.

Use GitHub private vulnerability reporting if it is enabled for this repository. If it is not available, contact the project maintainers through an appropriate private channel and include enough detail to reproduce or assess the issue.

## Scope

Security-relevant reports include, but are not limited to:

- authentication, session, or API-token bypasses
- journal/interface authorization bugs
- bridge trust, proof, signature, or synchronization integrity issues
- secret exposure in configuration, logs, release artifacts, documentation, or public APIs
- deployment defaults that expose privileged operations unintentionally
- vulnerabilities in release, container, or binary distribution workflows

Dependency scanner findings are most useful when accompanied by exploitability or reachability context for this project.

## Supported versions

Unless otherwise stated, security fixes target the current `main` branch and latest published release.

## Handling sensitive material

Do not include real secrets, private keys, access tokens, private journal data, database dumps, or production logs containing sensitive content in public reports. Redact secrets from command output and logs. Coordinate privately before sharing sensitive artifacts.
25 changes: 25 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Support

Use GitHub Issues for ordinary bug reports, feature requests, and questions.

For suspected vulnerabilities or sensitive security concerns, do not open a public issue. Follow `SECURITY.md` instead.

## Helpful information for bug reports

Include the details that apply:

- Sync Web version from `VERSION`, image tags, release tag, or commit SHA
- deployment mode: general Compose stack, ledger binary, local test compose, or another setup
- container runtime and host OS, for example Docker, Podman, Linux, macOS, or Windows
- affected service or area, such as journal, records, gateway, explorer, WebDAV file-system, ledger binary, or agent-recorder
- commands run and observed output
- relevant logs with secrets and private data redacted
- whether an existing journal database was updated with `JOURNAL_UPDATE=1`

## Useful references

- Records/Scheme object language: `records/LANGUAGE.md`
- General Compose deployment: `deploy/compose/general/README.md`
- Ledger binary deployment: `deploy/bin/ledger/README.md`
- Agent recorder: `tools/agent-recorder/README.md`
- Project contribution guidelines: `CONTRIBUTING.md`
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.2
1.4.3
8 changes: 7 additions & 1 deletion deploy/compose/general/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ SECRET=
# Port is stripped automatically for cookie domain config.
# DOMAIN=example.com
KRATOS_COOKIE_SECRET=changeme-32-chars-minimum-here
SYNC_WEB_VERSION=1.0.0
SYNC_WEB_VERSION=1.4.3
PORT=8192
HTTPS_PORT=443
PERIOD=2
WINDOW=1024
RUST_LOG=INFO
REQUEST_TIMEOUT_MS=30000

# Public journal endpoint and name advertised to bridge peers.
# INTERFACE defaults to ORIGIN/api/v1/journal/interface.
# JOURNAL_NAME defaults to INTERFACE.
# INTERFACE=https://example.com/api/v1/journal/interface
# JOURNAL_NAME=example

# Admin seeding — defaults: username=admin, password=SECRET
# ADMIN_USERNAME=admin
# ADMIN_PASSWORD= # defaults to SECRET if unset
Expand Down
6 changes: 4 additions & 2 deletions deploy/compose/general/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ podman-compose -f deploy/compose/general/compose.yaml up -d
- `SECRET` (required): authentication secret for restricted journal/gateway operations
- `HTTP_PORT` (default `8192`): host HTTP port exposed by router
- `HTTPS_PORT` (default `8193`): host TLS port exposed by router
- `ORIGIN` (default `http://localhost:8192`): public origin used by the identity provider; set this explicitly when using non-default/public ports or hostnames
- `ORIGIN` (default `http://localhost:8192`): public origin used by the identity provider and as the default base for the raw journal interface URL; set this explicitly when using non-default/public ports or hostnames
- `INTERFACE` (default `${ORIGIN}/api/v1/journal/interface`): public raw journal interface endpoint advertised to bridge peers
- `JOURNAL_NAME` (default `INTERFACE`): public journal display/peer name advertised to bridge peers
- `PERIOD` (default `2`): journal periodicity exponent
- `WINDOW` (default `1024`): retained historical state window
- `JOURNAL_UPDATE` (default empty): set to `1` to update an existing journal database from the mounted Lisp files before serving
Expand All @@ -65,7 +67,7 @@ podman-compose -f deploy/compose/general/compose.yaml up -d
- `ACME_WEBROOT_HOST_PATH` (default `./acme-challenge`): host directory mounted at `/var/www/acme-challenge` for HTTP-01 challenge files
- `TLS_CERT_FILE` (default `/etc/nginx/certs/tls.crt`): in-container certificate path used by router
- `TLS_KEY_FILE` (default `/etc/nginx/certs/tls.key`): in-container key path used by router
- `FILE_SYSTEM_IMAGE` (default `ghcr.io/sandialabs/sync-web/file-system:1.4.1`): image used by the `file-system` service
- `FILE_SYSTEM_IMAGE` (default `ghcr.io/sandialabs/sync-web/file-system:1.4.3`): image used by the `file-system` service
- `SYNC_FS_MAX_OBJECT_BYTES` (default `1048576`): maximum WebDAV object size

Gateway note:
Expand Down
Loading
Loading