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
157 changes: 127 additions & 30 deletions .github/workflows/ost-source-ci.yml

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
cancel-in-progress: false

env:
OST_VERSION: '0.22.8'
OST_VERSION: '0.23.19'
OST_REPOSITORY: animu-sphere/open-strata
OST_PLATFORM: cy2026
OST_PROFILE: usd
Expand All @@ -40,7 +40,9 @@ jobs:
ost_home: ''
runtime_artifact: sha256:ebb0c7da509ee14ada19ee5b461de6996aad0024b5c9640f12dde76912e849b5
runtime_remote: oci://ghcr.io/animu-sphere/openstrata-runtime-cy2026-usd@sha256:d3ff79a6f330558c3b9a427a927d340fe3dcab1fe89107faa0ea9f66a104b7bf
host_python: ''
# ost 0.23.x runtime validation runs a C++ consumer whose USD DLLs
# import python313.dll; see openstrata.ci.yaml.
host_python: '3.13'
host_packages_apt: ''
up_to: 4
- name: linux-x86_64
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ All notable changes to this project are documented here.
exact file-format arguments. The layout is in the
[file-format argument contract](docs/architecture/FILE_FORMAT_ARGUMENTS.md#generated-payload-ownership).

- Typed working-storage diagnostics: `usdgeo::DiagnosticCode` gains
`SpoolWorkspaceFailed`, `SpoolWriteFailed`, `SpoolIncomplete`,
`OpenFileBudgetExhausted`, and `PayloadCommitFailed`, with
`usdgeo::IsWorkingStorageFailure` and
`usdgeo::StoppedByWorkingStorageFailure`. Tiled reads stopped by their own
storage report the new plugin codes `LAS018`, `LAZ009`, `PLY008`, and
`COPC013`.

### Changed

- Tile spools, the spool workspace, and payload publication report the
working-storage codes above instead of `DecodeFailure`, so a full disk, a
refused workspace, or a process out of file handles is no longer presented
as a source decoding problem. A tiled read stopped this way reports the new
plugin code rather than `LAS016`, `LAZ007`, `PLY007`, or `COPC007`.
- Layer authoring builds content in an in-memory stage that loads nothing, and
payload files are exported from in-memory layers. No authoring call renames
a caller's layer or gives a scratch layer a file identity any more.
Expand All @@ -48,6 +61,25 @@ All notable changes to this project are documented here.
- The authoring stream benchmark builds on macOS, where `std::uintmax_t` and
`std::uint64_t` are distinct types.

### CI

- Bootstrap OpenStrata `ost` 0.23.19 (from 0.22.8) in source CI and the
release workflow, and regenerate `ost-source-ci.yml` with that CLI. The
generated workflow passes OpenUSD requirement arguments to artifact pull and
verify, adds an `ost library pull` step (nothing is pulled; the workspace
declares no external libraries), supports the `pyramid` and `package` verify
modes, and uploads the `.strata/reports` and `dist` outputs as job
artifacts.
- The three OpenUSD 26.08 runtime artifacts are rechecked rather than
re-pinned: the registry still serves the `26.08-gl-windows-x86_64`,
`26.08-metal-macos-arm64`, and `26.08-gl-linux-x86_64` leaves at the pinned
digests, and 26.08 is still the newest version in ost's runtime matrix. The
provenance comment in `openstrata.ci.yaml` now names those leaves and
digests.
- Windows cells declare `host_python: "3.13"`. ost 0.23.x `runtime validate`
links and runs a C++ consumer, and the Windows runtime's USD DLLs import
`python313.dll`, which is on PATH only after host Python is set up.

### Compatibility

- Payload files written by earlier tiled reads directly into
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ remote read actually costs is recorded in the
## Quick Start

Requirements: CMake 3.23+, a C++17 compiler, OpenUSD 26.08 (the plugin
contract accepts `>=26.08,<27.0`), and OpenStrata 0.22.7 for the pinned
contract accepts `>=26.08,<27.0`), and OpenStrata 0.23.19 for the pinned
workspace build.

Build and test everything through the pinned OpenStrata workspace:
Expand Down
63 changes: 52 additions & 11 deletions docs/architecture/DIAGNOSTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ Category names obey rule 1 below: a name is never reused for a different
meaning. Decision messages are fixed constants owned by `usdgeo::cache`, so no
transport specific and no token content can reach one.

Tiled reads report failures of their own working storage under one
additional fatal code per plugin, chosen when the first error is a
[working-storage code](#working-storage-codes); every other tiled authoring
failure keeps the plugin's existing "could not be authored" code:

| Plugin | Working storage failed | Other tiled authoring failure |
| --- | --- | --- |
| `pointcloud-las` | `LAS018` | `LAS016` |
| `pointcloud-laz` | `LAZ009` | `LAZ007` |
| `pointcloud-ply` | `PLY008` | `PLY007` |
| `pointcloud-copc` | `COPC013` | `COPC007` |

Remaining limitations of the current migration:

- The reader compatibility projection still classifies some legacy messages
Expand Down Expand Up @@ -75,11 +87,24 @@ enum class DiagnosticCode {
UnsupportedExtraBytesType,
MissingWaveformData,
NonFiniteCoordinate,
DecodeFailure,
UnknownFormatArgument,
UnsupportedFormatArgument,
InvalidFormatArgument,
ConflictingFormatArguments
NonFiniteExtraBytes,
DecodeFailure,
SourceOpenFailed,
SourceSizeUnavailable,
UnknownFormatArgument,
UnsupportedFormatArgument,
InvalidFormatArgument,
ConflictingFormatArguments,
InvalidPointTileId,
InvalidPointSourceRange,
InvalidLodItem,
InvalidLodHierarchy,
InvalidPointTile,
SpoolWorkspaceFailed,
SpoolWriteFailed,
SpoolIncomplete,
OpenFileBudgetExhausted,
PayloadCommitFailed,
};

struct Diagnostic {
Expand Down Expand Up @@ -138,12 +163,6 @@ Sampling and tile-generation failures follow the same rule: readers and
generators collect diagnostics, and the authoring layer refuses to author a
hierarchy that fails validation rather than emitting a partial LOD root.

The [streaming and tiling](../roadmap/streaming-and-tiling.md) work adds
conditions this taxonomy does not yet cover — spool write failures, incomplete
spool detection, exhausted open-file budgets, and payload commit failures.
Each gets a new `DiagnosticCode` value and a new plugin code when it ships;
none reuses an existing meaning.

`v0.10.0` adds resolver identity and generated-cache decisions to the same
taxonomy: identity unavailable, unstable, stable, or changed, and cache reuse
disabled, cache hit, or cache invalidated. These explain the decision without
Expand All @@ -153,3 +172,25 @@ leaking transport specifics or validation-token contents, so a message such as
source validation identity.` is. The contract is in
[RESOLVER_SOURCE.md](RESOLVER_SOURCE.md); the code names follow rule 1 above
and are not reserved in advance.

## Working-storage codes

The [streaming and tiling](../roadmap/streaming-and-tiling.md) work added
failure conditions that belong to the generator's own files rather than to the
source. They previously surfaced as `DecodeFailure`, which told a caller to
suspect the input when the disk, the workspace, or the process was at fault.
Each now has its own value; none reuses an existing meaning:

| Code | Raised when |
| --- | --- |
| `SpoolWorkspaceFailed` | The tile-spool workspace cannot be determined, created, initialized, recovered, or removed, or an existing directory carries no spool marker and is refused rather than emptied. |
| `SpoolWriteFailed` | A tile spool cannot be created, or its header, records, flush, or footer cannot be written. |
| `SpoolIncomplete` | A tile spool is missing, truncated, structurally invalid, or lacks the footer that commits its point count. |
| `OpenFileBudgetExhausted` | Opening a tile spool fails because the process has no file handles left (`EMFILE` or `ENFILE`). |
| `PayloadCommitFailed` | A payload generation cannot be prepared, staged, or published into its payload directory. |

`usdgeo::IsWorkingStorageFailure` classifies a code, and
`usdgeo::StoppedByWorkingStorageFailure` reports whether the first error in a
list is one; a plugin uses the latter to choose its working-storage code.
Open-file exhaustion is recognized from the C runtime's `errno` after a failed
open, which every supported platform sets.
2 changes: 1 addition & 1 deletion docs/compatibility/OPENUSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ provided by a separately installed resolver such as
| --- | --- |
| Validated OpenUSD version | 26.08 |
| Accepted range | `>=26.08,<27.0` |
| OpenStrata CLI | 0.22.7 |
| OpenStrata CLI | 0.23.19 (CI bootstrap) |
| OpenStrata platform / profile | `cy2026` / `usd` |
| C++ standard | C++17 |
| CMake | 3.23 or newer |
Expand Down
3 changes: 2 additions & 1 deletion docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Requirements:

- CMake 3.23 or newer
- A C++17 compiler
- OpenStrata `ost` 0.22.7 for the pinned workspace build
- OpenStrata `ost` 0.23.19 for the pinned workspace build (the CI bootstrap
in `openstrata.ci.yaml`)
- OpenUSD 26.08 for the USD targets, with the plugin contract accepting
`>=26.08,<27.0`

Expand Down
14 changes: 14 additions & 0 deletions docs/roadmap/implementation-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,20 @@ remain be explicit.
options select the workspace, marked leftovers are recovered on the next
invocation, and conversion ties the workspace to its transaction marker.

#### Working-storage diagnostics

The [diagnostics contract](../architecture/DIAGNOSTICS.md) reserved typed
codes for the spool and payload failures that tiled generation introduced.

- [x] Report spool write failures, incomplete spool detection, exhausted
open-file budgets, spool workspace failures, and payload commit
failures through dedicated `usdgeo::DiagnosticCode` values instead of
`DecodeFailure`
- [x] Project them onto one new fatal code per plugin (`LAS018`, `LAZ009`,
`PLY008`, `COPC013`) when the first error of a tiled read is a
working-storage failure, keeping the existing authoring codes for every
other cause

#### Research - runtime streaming (no release gate)

- [x] Add an opt-in COPC runtime-streaming probe that takes a requested node
Expand Down
13 changes: 10 additions & 3 deletions libs/usd-geo-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ usdgeo/SpatialBounds.h Vec3d, SpatialBounds
usdgeo/GeoReference.h GeoReference and its coordinate transforms
usdgeo/TileId.h TileId
usdgeo/CacheKey.h CacheArguments, NormalizeCacheArguments, StableCacheKey
usdgeo/Diagnostic.h Severity, DiagnosticCode, Diagnostic
usdgeo/Diagnostic.h Severity, DiagnosticCode, Diagnostic,
IsWorkingStorageFailure, StoppedByWorkingStorageFailure
usdgeo/RandomAccessSource.h RandomAccessSource, LocalRandomAccessSource
```

Expand Down Expand Up @@ -82,6 +83,14 @@ Fallible operations return `bool` and use out-parameters; source reads report
typed `Diagnostic` values for invalid ranges, missing files, and short reads.
Validity predicates are `noexcept` and total (`IsValid`, `IsFinite`).

Five codes describe the generator's own working storage rather than the
source: `SpoolWorkspaceFailed`, `SpoolWriteFailed`, `SpoolIncomplete`,
`OpenFileBudgetExhausted`, and `PayloadCommitFailed`.
`IsWorkingStorageFailure` classifies a code, and
`StoppedByWorkingStorageFailure` reports whether the first error in a
diagnostic list, the one that stopped the operation, is one of them. Their
meaning is in the [diagnostics contract](../../docs/architecture/DIAGNOSTICS.md#working-storage-codes).

## Threading and ownership

All types are plain values with automatic storage. There is no shared mutable
Expand Down Expand Up @@ -126,8 +135,6 @@ bundle. See [BUILDING.md](../../docs/guides/BUILDING.md).

## Planned work

- Diagnostic codes for the spool and payload failures introduced by
[streaming and tiling](../../docs/roadmap/streaming-and-tiling.md).
- Cache-key inputs for tiling configuration, once that configuration exists.
- `usdGeoCache` builds on `StableCacheKey` for USDC cache identity, layout,
lookup, and invalidation. Generation and manifest publication belong to its
Expand Down
37 changes: 37 additions & 0 deletions libs/usd-geo-core/include/usdgeo/Diagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <cstdint>
#include <optional>
#include <string>
#include <vector>

namespace usdgeo {

Expand Down Expand Up @@ -37,8 +38,32 @@ enum class DiagnosticCode {
InvalidLodItem,
InvalidLodHierarchy,
InvalidPointTile,
// Tiled working storage. These describe the generator's own files rather
// than the source, so a caller can tell a full disk, a refused workspace,
// or a process out of file handles apart from bad input.
SpoolWorkspaceFailed,
SpoolWriteFailed,
SpoolIncomplete,
OpenFileBudgetExhausted,
PayloadCommitFailed,
};

// True for the codes that report a failure of the generator's own working
// storage (tile spools, their workspace, or payload publication) rather than
// a problem with the source or the request.
constexpr bool IsWorkingStorageFailure(DiagnosticCode code) noexcept {
switch (code) {
case DiagnosticCode::SpoolWorkspaceFailed:
case DiagnosticCode::SpoolWriteFailed:
case DiagnosticCode::SpoolIncomplete:
case DiagnosticCode::OpenFileBudgetExhausted:
case DiagnosticCode::PayloadCommitFailed:
return true;
default:
return false;
}
}

struct Diagnostic {
DiagnosticCode code = DiagnosticCode::DecodeFailure;
Severity severity = Severity::Error;
Expand All @@ -47,4 +72,16 @@ struct Diagnostic {
std::optional<std::uint64_t> pointIndex;
};

// True when the first error, the one that stopped the operation, is a working
// storage failure. Later entries only add context to that first error.
inline bool StoppedByWorkingStorageFailure(
const std::vector<Diagnostic>& diagnostics) noexcept {
for (const auto& diagnostic : diagnostics) {
if (diagnostic.severity == Severity::Error) {
return IsWorkingStorageFailure(diagnostic.code);
}
}
return false;
}

} // namespace usdgeo
30 changes: 30 additions & 0 deletions libs/usd-geo-core/tests/test_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,42 @@ void TestDiagnostics() {
Check(pointError.pointIndex.has_value() && pointError.pointIndex.value() == 42);
}

void TestWorkingStorageDiagnostics() {
using usdgeo::DiagnosticCode;
for (const auto code : {DiagnosticCode::SpoolWorkspaceFailed,
DiagnosticCode::SpoolWriteFailed,
DiagnosticCode::SpoolIncomplete,
DiagnosticCode::OpenFileBudgetExhausted,
DiagnosticCode::PayloadCommitFailed}) {
Check(usdgeo::IsWorkingStorageFailure(code));
}
for (const auto code : {DiagnosticCode::DecodeFailure,
DiagnosticCode::SourceOpenFailed,
DiagnosticCode::InvalidPointTile,
DiagnosticCode::TruncatedRecord}) {
Check(!usdgeo::IsWorkingStorageFailure(code));
}

// The first error decides; warnings before it and context after it do not.
const usdgeo::Diagnostic warning{DiagnosticCode::SpoolWriteFailed,
usdgeo::Severity::Warning, "w"};
const usdgeo::Diagnostic storage{DiagnosticCode::SpoolIncomplete,
usdgeo::Severity::Error, "spool"};
const usdgeo::Diagnostic decode{DiagnosticCode::DecodeFailure,
usdgeo::Severity::Error, "decode"};
Check(!usdgeo::StoppedByWorkingStorageFailure({}));
Check(usdgeo::StoppedByWorkingStorageFailure({warning, storage, decode}));
Check(!usdgeo::StoppedByWorkingStorageFailure({warning, decode, storage}));
Check(!usdgeo::StoppedByWorkingStorageFailure({warning}));
}

} // namespace

int main() {
TestBounds();
TestGeoReference();
TestTileAndCacheKeys();
TestDiagnostics();
TestWorkingStorageDiagnostics();
return 0;
}
10 changes: 10 additions & 0 deletions libs/usd-pointcloud-authoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ authored, so a failed call does not leave a partially populated prim or a LOD
root with missing children. OpenUSD's own diagnostics (`TF_RUNTIME_ERROR`) are
emitted by the calling bundle, not here.

Tiled authoring reports failures of its own working storage with dedicated
codes, so a bundle can tell a full disk or a refused workspace from bad input:
`SpoolWorkspaceFailed` when the spool workspace cannot be determined, created,
recovered, or removed (including a directory that carries no spool marker and
is therefore refused rather than emptied), `SpoolWriteFailed`,
`SpoolIncomplete`, and `OpenFileBudgetExhausted` from the tile spools, and
`PayloadCommitFailed` when a payload generation cannot be prepared, staged, or
published. The first error is the cause; later entries add context.
`usdgeo::StoppedByWorkingStorageFailure` tests for this case.

## Threading and ownership

Authoring functions take an `SdfLayer*` or `UsdStageRefPtr` owned by the
Expand Down
Loading
Loading