You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Classify CZDS malformed record structure without disclosing zone data - #8
The protected October 22 NSDB preflight of gov.txt.gz failed with reason=record_fields. PR #7 (already merged) kept sensitive exception messages out of public logs but did not distinguish record shapes.
Changes
Shared, deterministic classify_record_fields() for malformed records in build_nsdb.py and the preflight header check.
Fixed public reason codes: record_blank, record_fields_comment, record_fields_directive, record_fields_space_delimited, record_fields_missing_tabs, record_fields_partial_tabs.
New synthetic compressed-zone subprocess fixtures for each category, including malformed first records.
Preflight/full-build CLI parity checks and assertions that source names and RDATA do not appear in logs.
README documents that categories are hints, not evidence that whitespace master-file parsing is safe.
Safety
No acceptance rule changed: input still fails whenever it has fewer than five tab-separated fields.
No SOA consistency, canonical ordering, delegation deduplication, or incomplete-input rejection changes.
Daily-release workflow unchanged; failing input still blocks publication.
The licensed gov.txt.gz record is unavailable to public CI; the next production preflight must reveal the new structural reason before a semantic parser correction is considered.
Conflict resolution: superseded by merged PR #9 (commit 78669f1757086155d2922ac69840c2868d98769b).
I compared the four modified paths in this PR against current main. The shared first-record/streaming classify_record_fields() implementation, public fixed diagnostic codes, privacy assertions, and compressed synthetic-fixture parity checks are already present on main. The scripts/preflight_czds.py blob is identical. main additionally covers record_fields_mixed_delimiters; its tests and documentation reflect that case.
GitHub reports this PR as mergeable_state=dirty because it overlaps the merged changes. Re-merging an older competing classifier would add no necessary behavior and risks regressing the newer test coverage. Closing as superseded, with the branch left intact for historical reference. This does not change production validation or publish private CZDS data.
Verification: merged PR #9 CI passed 49 tests, and CI on main passed. The protected runner must still rerun preflight to identify the actual .gov structural subcategory.
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
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.
Context
The protected October 22 NSDB preflight of
gov.txt.gzfailed withreason=record_fields. PR #7 (already merged) kept sensitive exception messages out of public logs but did not distinguish record shapes.Changes
classify_record_fields()for malformed records inbuild_nsdb.pyand the preflight header check.record_blank,record_fields_comment,record_fields_directive,record_fields_space_delimited,record_fields_missing_tabs,record_fields_partial_tabs.Safety
process_input()and the private aggregation interface are unchanged for issue Resume CZDS aggregation from verified per-zone checkpoints #6.gov.txt.gzrecord is unavailable to public CI; the next production preflight must reveal the new structural reason before a semantic parser correction is considered.Follow-up to #7; related to #6.