Repository navigation
labs/common-fields: negative checks and injected faults in both tests - #143
Merged
Merged
Conversation
test_schema.py: a map lookup on ResourceAttributes['svc.group'] does not use the primary key, a row without svc.* gets '' in the columns, and test_fault_fires drops svc_group from the logs sort key and asserts the pruning check then fails. test_collector.sh: an untagged log gets no svc.* key, and a copy of standard-fields.yaml without the "app value first" guard must fail the checks. README (EN/KO): the tests table, the Cloud build 26.8.1.608 on every Cloud number, tests re-run 2026-11-07 (clickhouse local 26.9.6.6, otelcol-contrib 0.155.0), and the unsourced "20-30 %" removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…memory) The rerun on 2026-11-07 failed on the 2 M-row logs INSERT ... SELECT with MEMORY_LIMIT_EXCEEDED (service total, maximum 6.89 GiB). The inserts now run as 16 chunks (logs 250 K, traces 125 K, metrics 60 K rows) that keep `number`. In clickhouse local 26.9.6.6 the chunked and one-shot inserts give the same rows: 2,000,000 / 500,000 / 480,000, equal row hashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four screens retaken in dark mode on Managed ClickStack (ClickHouse Cloud 26.8.1.608, Seoul), from the chunked demo.py run, 15 minutes 12:39-12:54 KST. Exact svc.group:"g7": 24,836 results, Scanned Rows 49,152; substring svc.group:g7 is sent as svc_group ILIKE '%g7%' and scans the same 49,152; the svc-107 error span shows its 4 log lines and the common fields. README (EN/KO) and lab.yaml carry the new count and date; the query_log check is from the 2026-11-06 run and says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… system.query_log Both searches' queries (svc_group = 'g7' at 04:18:06Z, svc_group ILIKE '%g7%' at 04:18:38Z) read 49,152 rows on ClickHouse Cloud 26.8.1.608; count() on 12:39-12:54 KST gives 24,836. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #139
PR #140 delivered this lab but wrote
Closes 139without the#, so #139 stayed open. This PR adds what #140 left out: a negative check and an injected fault in each test, plus a date and build on every number.Changed
tests/test_schema.pyResourceAttributes['svc.group'] = 'g7'does not use the primary key (PK conditiontrue, all granules), and a row withoutsvc.*gets''.test_fault_firesdropssvc_groupfrom the logs sort key and asserts that the pruning check then fails. The test first checks that the key it edits is still in the file.tests/test_collector.shsvc.*key.standard-fields.yamlwithout the "app value first" guard must fail the checks, and the script exits non-zero if that copy passes. The script first checks that the guard is still in the file.README.md(English and Korean)lab.yaml:verified_onupdated to match the README.Checked (2026-11-07)
python3 -m unittest discover -s labs/common-fields/tests: 5/5 tests OK on clickhouse local 26.9.6.6.schema.sql('svc.grp') madetest_columns_fillfail.labs/common-fields/tests/test_collector.shon otelcol-contrib 0.155.0 (Docker): 6/6 PASS on the real file. On the faulted copy,FAIL app: its own svc.group kept; the script still exits 0, because the fault was caught.check_links.py,check_syntax.shandotel-profiles/bin/lint.shall OK; gitleaks found no leaks.Demo inserts in chunks. The owner's rerun on 2026-11-07 failed on the 2 M-row logs
INSERT … SELECTwithMEMORY_LIMIT_EXCEEDED. That limit is the service's total, maximum 6.89 GiB.managed/demo.pynow runs the inserts as 16 chunks that keepnumber. In clickhouse local 26.9.6.6 the chunked and one-shot inserts give the same rows: 2,000,000 logs, 500,000 spans and 480,000 gauge points, with equal row hashes. The rerun's--cleanupremoved the 2026-11-06 demo objects.Managed ClickStack, 2026-11-07 (ClickHouse Cloud 26.8.1.608, Seoul; chunked
demo.py: 2,000,000 logs, 500,000 spans, 480,000 gauge points). The four captures inimages/were retaken in dark mode on Claude in Chrome over the 15 minutes 12:39–12:54 KST, cropped so that no personal name and no other source shows:ResourceAttributes.svc.group:"g7": 24,836 results, Scanned Rows 49,152ResourceAttributes.svc.group:g7: sent assvc_group ILIKE '%g7%', Scanned Rows 49,152Confirmed in
system.query_log: the exact search's query (svc_group = 'g7', 04:18:06Z) and the substring search's (svc_group ILIKE '%g7%', 04:18:38Z) each read 49,152 rows, andcount()on the window gives 24,836. The ClickStack Color Mode preference was set to Dark for the captures and back to System afterwards.The demo was removed after the captures (
demo.py --cleanup, 2026-11-07): nocommon_fields_demodatabase and nocf demo *sources are left on the Seoul service.Cost (API list-price equivalent, khai-harness
cost.py): $1.56, lead only.🤖 Generated with Claude Code