Generic template-column integration — 6.0.0-rc1

**Implemented in the CLI, opt-in.** Compare the frozen rc7 binary with the current release build using `--thin --standalone --template-factorization`, Native and Hybrid. The baseline already has optional legacy template factorization. The new option retains that complete incumbent whenever a candidate ties or loses.

Containers12/13 identify the new SHA-256/BLAKE3 composed representation. Older readers reject them explicitly; the new reader retains old formats1–11. The major candidate version records this archive capability change. No commit, push, tag, deployment or public binary release has been performed.

Complete stored size and measured cost

Actual CLI subprocess measurements include process launch and file I/O; exact-byte and independent SHA checks are outside timers. Alternate before/after order with two warmups and five measured rounds. Category times sum per-file medians; decoder times include archive checksum verification. These are shared-host observations on inspected sources, not isolated codec-kernel speed or machine-independent confidence intervals. The final capture runs after the source verification jobs finish.

WorkloadEngineBefore BAfter BSize reductionImprovedEncode time changeVerified decode time change
correlated later windownative94,89186,6418.69%2/6+16.12%+1.26%
correlated later windowhybrid84,66779,1946.46%2/6+5.72%+1.60%
generated generic JSON samplenative26,75826,7580.00%0/4+1.85%+1.02%
generated generic JSON samplehybrid25,62225,6220.00%0/4+2.84%+1.97%
generated project samplenative202,642195,9163.32%3/14+10.02%-3.68%
generated project samplehybrid197,453190,4233.56%4/14+4.31%-2.57%
public development excerptnative748,127731,4032.24%5/30+24.40%+0.48%
public development excerpthybrid683,169672,8641.51%5/30+9.01%+0.23%

Positive time changes mean more elapsed time. Every no-gain/slower source remains below. A larger global model search is not enabled by default. The standard comparator presets do not silently include the optional template switch.

What is generic

The common representation consumes record templates, value spans and chronological family IDs. No source filename, HTTP code, IP range, city name, log-product name or JSON field name selects a candidate. Logs retain the existing numeric/IP/token scanner. Validated JSON arrays of records and NDJSON provide exact scalar spans to the same representation, including nested values, duplicate keys and arbitrary key order. Quotes, escapes, number spelling, punctuation and whitespace restore exactly. A record above256 scalar spans is retained literally inside the model, rather than dropping it or rejecting all other records. Other unsupported inputs keep their ordinary archive.

Three log candidates: positional typed/numeric columns, family-plus-position delta columns and family-plus-position typed/numeric columns. Families with fewer than16 records pool by position. JSON compares positional columns, pooled-family columns and a shared lexical-value stream; the latter preserves possible reuse across changing schemas. Exact duplicate model bytes are coded once. This is deterministic complete-cost competition, not a claimed optimal model, trained semantic ontology or new entropy coder.

The four inspected GitHub windows and four additional API JSON fixtures currently retain their incumbents; generic support is not evidence of a measured JSON size gain on this panel. Single JSON objects with nested record arrays are not currently promoted as record batches by this adapter. Existing parsers/models remain available. CSV keeps its existing structured routes and the numeric-family scanner where eligible.

Decoder and compatibility

Raw and delta columns borrow encoded slices. Fixed-width packed integer columns use the shared numeric cursor without constructing synthetic NUMSTR frames or an allocation per packed scalar. Typed modes reuse the existing bounded column reader; some modes allocate decoded backing storage. This is bounded in-memory reconstruction, not a zero-allocation or20-GiB streaming claim.

Before final output allocation, validate catalog/ID/mapping references, expected value counts, checked fixed-template expansion and aggregate decoded lengths. The frame budgets are8MiB source,1,000,000 records/parameter occurrences,65,536 templates,4,096 columns and262,144 mapping entries, with source-derived backend limits. The JSON span adapter does not copy a field-path dictionary per scalar. The preceding rc7 literal-run representability guard remains in force.

The current suite passes **291 unit/integration tests**; **1536 actual CLI source restorations** match original bytes and SHA-256. **21 selected new-format archives** are explicitly rejected by the frozen old reader. **24 no-option controls** preserve archive bytes across default/fast/thin and both engines. Targeted tests cover SHA/BLAKE3, optional rANS4, lexical JSON, wide-record exceptions, capability downgrade, source-hash corruption, truncation, expansion and mutations. Source/binary hashes and exact replay snapshot are retained. Earlier interrupted runs are labeled partial and are not counted as passing final verification.

Reference stored-size positions

Reference archive sizes come from the same exact public inputs in the recorded6.0.0-rc1 panel. This table compares size only; it does not reuse reference timing for a speed claim.

EngineReferenceBefore winsAfter wins
nativeZstd_L916/3017/30
nativeBrotli_Q916/3017/30
nativeGzip_L924/3024/30
hybridZstd_L925/3025/30
hybridBrotli_Q920/3020/30
hybridGzip_L925/3025/30

Every source, including no-gain and slower cases

Each size comparison is a complete self-contained archive. Times are medians in milliseconds; the JSON raw trials retain all repeats.

SourceEngineBefore BAfter BSize reductionEncode before/after msVerified decode before/after msContainer
01_loghub_hdfs.lognative42,83533,94720.75%93.29 / 119.2110.70 / 10.8913
01_loghub_hdfs.loghybrid37,69732,91612.68%72.51 / 79.0010.02 / 10.3313
02_loghub_hadoop.lognative14,20414,2040.00%40.66 / 51.439.56 / 9.5011
02_loghub_hadoop.loghybrid12,90812,9080.00%37.09 / 40.359.61 / 9.5111
03_loghub_spark.lognative16,34916,3490.00%60.08 / 74.5611.34 / 11.4311
03_loghub_spark.loghybrid14,51814,5180.00%65.43 / 69.3511.46 / 11.7811
04_loghub_zookeeper.lognative6,3106,3100.00%56.42 / 63.1612.16 / 12.3711
04_loghub_zookeeper.loghybrid5,4515,4510.00%47.13 / 49.8111.99 / 11.8711
05_loghub_openstack.lognative41,82141,8210.00%81.58 / 82.619.60 / 9.755
05_loghub_openstack.loghybrid37,77237,7720.00%76.91 / 78.359.68 / 9.505
06_loghub_bgl.lognative11,51811,5180.00%62.30 / 68.5310.85 / 11.107
06_loghub_bgl.loghybrid10,85210,8520.00%55.06 / 56.3410.62 / 10.857
07_loghub_hpc.lognative16,70515,9294.65%66.61 / 76.1810.47 / 9.8513
07_loghub_hpc.loghybrid15,92715,2354.34%55.18 / 59.219.81 / 9.8713
08_loghub_thunderbird.lognative39,01539,0150.00%90.45 / 118.3312.30 / 12.8811
08_loghub_thunderbird.loghybrid35,16635,1660.00%72.04 / 81.1912.50 / 12.6611
09_loghub_windows.lognative10,77010,7700.00%57.11 / 74.4912.08 / 11.9511
09_loghub_windows.loghybrid9,6509,6500.00%61.47 / 66.0712.45 / 12.1811
10_loghub_linux.lognative31,83031,8300.00%83.62 / 111.269.70 / 9.407
10_loghub_linux.loghybrid26,07126,0710.00%62.23 / 83.079.53 / 9.055
11_loghub_mac.lognative22,24022,2400.00%66.61 / 82.789.07 / 9.077
11_loghub_mac.loghybrid20,02120,0210.00%56.86 / 65.2211.99 / 11.6111
12_loghub_android.lognative40,96040,9600.00%78.27 / 79.8210.31 / 10.037
12_loghub_android.loghybrid38,97438,9740.00%65.99 / 66.479.64 / 9.757
13_loghub_healthapp.lognative20,54516,65918.91%78.72 / 89.0012.97 / 13.6713
13_loghub_healthapp.loghybrid18,13615,69513.46%83.35 / 82.3914.03 / 13.6913
14_loghub_apache.lognative22,36822,3680.00%72.81 / 88.1010.76 / 10.857
14_loghub_apache.loghybrid21,15221,1520.00%60.22 / 66.1910.25 / 10.677
15_loghub_openssh.lognative12,73112,3463.02%63.68 / 74.2210.89 / 11.8113
15_loghub_openssh.loghybrid11,70611,4362.31%55.80 / 58.2510.48 / 11.1713
16_loghub_proxifier.lognative22,87420,08512.19%65.72 / 77.219.85 / 10.7113
16_loghub_proxifier.loghybrid21,56619,4459.83%56.32 / 62.589.64 / 10.7713
17_beats_nginx_access.lognative7747740.00%15.18 / 16.328.11 / 7.525
17_beats_nginx_access.loghybrid6446440.00%18.42 / 18.467.79 / 7.725
18_beats_nginx_error.lognative6636630.00%13.62 / 14.407.67 / 7.775
18_beats_nginx_error.loghybrid5615610.00%17.59 / 17.927.73 / 7.955
19_beats_postgresql_log.lognative2,5312,5310.00%18.69 / 21.048.01 / 8.2011
19_beats_postgresql_log.loghybrid2,2642,2640.00%20.91 / 21.678.08 / 7.815
20_beats_mysql_slowlog.lognative2,4942,4940.00%16.61 / 17.568.12 / 8.0311
20_beats_mysql_slowlog.loghybrid2,2282,2280.00%19.51 / 19.947.99 / 8.0411
21_beats_mongodb_log.lognative1,7841,7840.00%16.39 / 17.397.72 / 7.735
21_beats_mongodb_log.loghybrid1,5191,5190.00%19.52 / 19.318.08 / 8.045
22_beats_redis_log.lognative1,0781,0780.00%47.73 / 60.5210.63 / 10.407
22_beats_redis_log.loghybrid8998990.00%44.20 / 53.8810.45 / 10.357
23_beats_elasticsearch_audit.lognative1,6331,6330.00%14.33 / 15.607.73 / 7.655
23_beats_elasticsearch_audit.loghybrid1,3361,3360.00%18.75 / 19.198.01 / 8.015
24_beats_traefik_access.lognative1,0581,0580.00%14.23 / 15.497.96 / 7.715
24_beats_traefik_access.loghybrid9269260.00%18.37 / 17.907.98 / 7.815
25_nasa_http_jul95.lognative36,15136,1510.00%78.81 / 80.7210.06 / 9.887
25_nasa_http_jul95.loghybrid35,05735,0570.00%76.57 / 76.789.93 / 9.747
26_nasa_http_aug95.lognative37,28337,2830.00%76.01 / 78.309.89 / 9.847
26_nasa_http_aug95.loghybrid35,95635,9560.00%73.21 / 74.699.47 / 9.487
27_github_events_20150101_00.jsonlnative76,93576,9350.00%81.15 / 129.0710.03 / 9.765
27_github_events_20150101_00.jsonlhybrid69,50769,5070.00%75.87 / 89.529.12 / 9.025
28_github_events_20150101_06.jsonlnative71,97871,9780.00%81.00 / 125.959.85 / 9.885
28_github_events_20150101_06.jsonlhybrid65,77565,7750.00%76.60 / 88.719.35 / 9.145
29_github_events_20150101_12.jsonlnative68,12068,1200.00%74.77 / 121.839.98 / 10.187
29_github_events_20150101_12.jsonlhybrid62,75362,7530.00%70.65 / 83.599.21 / 9.125
30_github_events_20150101_18.jsonlnative72,57072,5700.00%78.53 / 125.7110.20 / 10.207
30_github_events_20150101_18.jsonlhybrid66,17766,1770.00%73.33 / 86.579.00 / 9.075
healthapp_1024k.lognative18,94914,87121.52%81.82 / 94.1213.15 / 13.5213
healthapp_1024k.loghybrid16,52914,00015.30%66.05 / 69.8512.67 / 13.3813
healthapp_2048k.lognative19,36215,19021.55%81.52 / 92.0612.83 / 13.5213
healthapp_2048k.loghybrid17,21414,27017.10%65.09 / 67.8712.90 / 13.7613
spark_1024k.lognative20,03620,0360.00%79.01 / 90.7811.80 / 11.9611
spark_1024k.loghybrid18,15718,1570.00%64.89 / 70.6912.36 / 12.0011
spark_2048k.lognative19,78419,7840.00%76.51 / 91.2011.87 / 11.8611
spark_2048k.loghybrid17,94317,9430.00%64.60 / 67.6812.24 / 12.0711
windows_1024k.lognative8,2678,2670.00%44.12 / 43.8611.50 / 11.4611
windows_1024k.loghybrid7,2987,2980.00%53.63 / 54.1911.31 / 11.1711
windows_2048k.lognative8,4938,4930.00%56.69 / 75.3111.72 / 11.4711
windows_2048k.loghybrid7,5267,5260.00%60.53 / 65.9511.31 / 11.5711
01_nginx_access.lognative10,85310,8530.00%62.78 / 80.118.64 / 8.677
01_nginx_access.loghybrid10,22310,2230.00%55.90 / 70.938.86 / 9.087
02_nginx_error.lognative11,4379,45117.36%57.89 / 62.119.93 / 9.5213
02_nginx_error.loghybrid11,2829,36317.01%50.11 / 52.6710.18 / 9.8613
03_app_json.lognative23,28323,2830.00%47.52 / 54.3210.59 / 10.3811
03_app_json.loghybrid22,58922,5890.00%45.10 / 50.8410.73 / 10.6711
04_k8s_container.lognative16,77316,7730.00%41.32 / 41.9810.40 / 10.3411
04_k8s_container.loghybrid15,92115,9210.00%43.20 / 44.528.86 / 8.507
05_syslog_systemd.lognative9,3899,3890.00%45.29 / 46.478.99 / 8.847
05_syslog_systemd.loghybrid8,9278,9270.00%44.00 / 44.348.94 / 8.947
06_aws_cloudtrail.jsonnative9,3209,3200.00%35.39 / 35.879.02 / 8.947
06_aws_cloudtrail.jsonhybrid9,0399,0390.00%38.37 / 39.269.47 / 9.427
07_aws_vpcflow.lognative33,64833,6480.00%101.53 / 115.639.72 / 9.567
07_aws_vpcflow.loghybrid33,91833,5211.17%86.26 / 79.7210.09 / 11.0013
08_dns_queries.lognative20,92417,52416.25%63.20 / 73.899.51 / 9.4213
08_dns_queries.loghybrid20,23917,08015.61%53.94 / 56.129.34 / 9.5713
09_postgres_slowquery.csvnative7,5047,5040.00%41.85 / 46.989.51 / 9.437
09_postgres_slowquery.csvhybrid7,0747,0740.00%40.19 / 42.839.59 / 9.647
10_rest_api_batch.jsonnative5,7625,7620.00%27.88 / 28.599.47 / 9.377
10_rest_api_batch.jsonhybrid5,4735,4730.00%33.24 / 33.759.46 / 9.507
11_opentelemetry_traces.jsonnative7,2427,2420.00%39.36 / 40.6912.14 / 12.145
11_opentelemetry_traces.jsonhybrid7,2427,2420.00%46.35 / 48.0112.34 / 11.945
12_financial_ticks.csvnative21,88920,5496.12%75.94 / 82.7713.67 / 9.9013
12_financial_ticks.csvhybrid21,50719,9527.23%60.70 / 61.6713.87 / 9.9713
13_stripe_webhooks.jsonnative9,4129,4120.00%32.16 / 33.109.37 / 9.057
13_stripe_webhooks.jsonhybrid9,3199,3190.00%32.83 / 33.338.97 / 8.847
17_github_actions_ci.lognative15,20615,2060.00%46.48 / 48.1110.27 / 10.4511
17_github_actions_ci.loghybrid14,70014,7000.00%46.21 / 47.5410.46 / 10.6211
api_payload.jsonnative9,9449,9440.00%41.41 / 42.0110.97 / 11.287
api_payload.jsonhybrid9,5369,5360.00%45.40 / 47.3710.87 / 11.067
api_batch1.jsonnative5,6235,6230.00%27.96 / 28.579.35 / 9.397
api_batch1.jsonhybrid5,3745,3740.00%33.00 / 34.179.43 / 9.637
api_batch2.jsonnative5,5795,5790.00%28.19 / 29.079.40 / 9.307
api_batch2.jsonhybrid5,3375,3370.00%32.79 / 33.519.47 / 9.517
api_batch3.jsonnative5,6125,6120.00%28.57 / 28.829.43 / 9.587
api_batch3.jsonhybrid5,3755,3750.00%32.89 / 33.139.45 / 9.807

Reproduce

Build the recorded source snapshot with `cargo build --release --bin pizd`. Keep the frozen rc7 reader at `target/composition-integration/pizd-rc7`; its source snapshot and binary identity are recorded in the preceding study. Run `python3 tools/verify_template_composition.py`, then `python3 tools/render_template_composition_integration.py`. Cached inputs are identified by exact source hashes; raw public logs and binaries are not added to Git.

`pizd compress input.log --offline --standalone --thin --template-factorization --engine native -o input.pizd`

Use `--engine hybrid` for the Zstd-backed variant. Use the current reader to restore archives produced with the new capability. Older reader rejection is intentional; ordinary retained archives keep their prior formats.

Remaining work

Broaden independent real structured workloads after freezing this policy. The generic JSON route still needs a measured density advantage on the current losing GitHub data. Deeper/shared schemas, generic key/value record adapters and actual stream-model reuse remain separate research; no gain is booked from those ideas.

Ordinary fast-policy boundary

The fresh maintained public30 panel has540 verified rows; the18-source standard panel records17/18 size,1/18 encode-speed and11/18 verified-decode-speed wins in its cross-profile best-reference summary. Those ordinary presets do not contain the optional template switch; these counts are not its isolated effect.

Against the earlier recorded public rc6 source, Hybrid fast HealthApp changes36,922 ->45,430 B, Apache27,102 ->35,284 B and the Traefik fixture941 ->938 B;537 other stored-size rows match. The earlier public source used a22-percent structural-benefit gate. The frozen rc7 baseline already used24 percent and a broader direct fallback. Three additional CLI controls prove the affected fast archives remain byte-identical between frozen rc7 and this integration, with exact restoration. Preserve the larger historical fast results and keep that source boundary separate from composition. Details: fast_policy_boundary.json and ordinary_panel_identity.json.