Skip to content

Report the charts an open or a bake dropped - #70

Merged
beetlebugorg merged 4 commits into
mainfrom
fix/ingest-report-losses
Sep 7, 2026
Merged

Report the charts an open or a bake dropped#70
beetlebugorg merged 4 commits into
mainfrom
fix/ingest-report-losses

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

An open or a bake dropped a cell silently, and a chart set with a gap in it looks like a complete one. Each dropped cell is named on stderr with the reason, and the counts a host reads are correct. Stacked on #69.

addPathCell reports whether it used the cell, openPath and openCharts count what they skipped, and the bake names a cell that produced no backend. The bake's label fires only after the archive, aux files and hash are written, so a host stops printing a finished chart for one that failed.

skipped went into tile57_compose_meta between charts and west, described as an append. That struct ends on a double with no spare padding, so it grew from 40 to 48 bytes and moved west from offset 8 to 16. tile57_compose_get_meta writes the whole struct, so a host built against the previous header passed a 40-byte object and had 48 bytes written into it. The count is tile57_compose_skipped instead, and both openers derive it by subtracting what the open kept from what it was handed.

zig build, zig build test and zig fmt --check pass.

@beetlebugorg
beetlebugorg force-pushed the fix/ingest-report-losses branch from d2c824f to 5939c04 Compare September 5, 2026 02:23
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-report-losses branch from 5939c04 to a74985c Compare September 6, 2026 19:23
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-report-losses branch from a74985c to 64db5c6 Compare September 6, 2026 20:27
Base automatically changed from fix/ingest-extent-scale to main September 6, 2026 23:07
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-report-losses branch 2 times, most recently from 93ab377 to 286e358 Compare September 6, 2026 23:27
Four paths lost a chart in silence. bakeOneToFile returns void and bails
at four points, and the label callback fired for every cell, so a host
printed a finished chart for one that was never written. bakeArchive
added the attempted count to its progress total before inspecting any
result, so the bar reached the end whether the cells loaded or not.
openCharts errored only when every cell failed, and openPath dropped a
cell it could not read or parse, or one with no extent.
tile57_compose_open computed the count it composed and discarded it.

The label now fires for a chart that was written, progress counts the
cells that produced a backend, and each lost chart prints a line naming
it, as a lost tile already does.

tile57_info gains skipped_cells and tile57_compose_meta gains skipped,
both appended. A host reads them to tell a chart set with a gap in it
from a complete one.

Baking a directory holding a cell that is not S-57 writes the archives
for the rest and names the one it dropped.
The count went into tile57_compose_meta between charts and west,
described as appended for ABI-append-safety. That struct ends on a double
and has no spare padding, so the new field moved the bounds and grew the
struct:

  before: sizeof 40, west at 8, north at 32
  after:  sizeof 48, west at 16, north at 40

tile57_compose_get_meta writes the whole struct, so a host built against
the previous header passed a 40-byte object and had 48 bytes written into
it, then read its western bound from the count and the padding after it.
No field can be added to this struct safely, so the count is now its own
call, tile57_compose_skipped. The struct is back to its previous layout,
measured against both headers.

The tile57_info append is safe: skipped_cells uses the padding after
is_raster and the struct stays 96 bytes, measured against both headers.
The count was the charts with no decoded coverage, taken before the open
ran. openBorrowed drops more after that: a chart whose coverage decoded
to an empty ring owns no ground and is absent from every composed tile.
Those went uncounted, so charts plus skipped came to less than the number
handed in, and a chart missing from the quilt had no sign of it.

Both openers now subtract what the open kept from what it was handed, so
the two numbers add up by construction. The raster opener never set the
count at all and reported 0 whatever it dropped.

The bake's own skipped counter is removed. It was incremented and never
read, under a comment saying a host reports it. The CHART LOST line
beside it is the report.
The field is set when a chart opens from ENC source. Every open this
header exports is archive-backed, so a host calling
tile57_chart_get_info reads 0 there whatever the source set held, and the
text promising a way to tell a set with a gap from a complete one
described a value no caller can reach.

The comment now says where it is filled and points at the per-cell lines
the engine writes to stderr, the report a host gets today.
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-report-losses branch from 286e358 to 8874b1b Compare September 7, 2026 02:01
@beetlebugorg
beetlebugorg merged commit 7c7ba58 into main Sep 7, 2026
5 checks passed
@beetlebugorg
beetlebugorg deleted the fix/ingest-report-losses branch September 7, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant