Skip to content

Profiler: nested documents, entities inside parts, false hierarchies, findings-first narration - #899

Merged
paulananth merged 4 commits into
mainfrom
claude/profiling-01d-nested
Oct 10, 2026
Merged

paulananth merged 4 commits into
mainfrom
claude/profiling-01d-nested

Conversation

@paulananth

Copy link
Copy Markdown
Owner

What this fixes

Profiling the insider ownership filings (Forms 3, 4 and 5; ticket 07) classed every part "unknown" and showed six hierarchies that did not exist. All of the causes are in the profiler, and each fix is generic. Operator: "Fix the profiler first (Recommended)"; standing instruction: "fix the skill once you find any issue".

Reading nested documents

  • Two equal-length lists of records, such as a document's transactions and its holdings, were zipped together as one table. Each transaction got paired with an unrelated holding, and single-item lists were left behind as columns: 1,360 of 8,391 transactions were missing. Now only lists of plain values are read as a table stored by column.
  • A nested record with no key of its own is identified by its parent's key and its place in the list. Classification now counts that as a key; the findings still mark it as designed.

Entities carried inside a part (new: embedded.py)

  • An identifier column that repeats, with a name-like column in the same object that follows it on 95% of rows, becomes its own part (derived_from). The part it came from links to it.
  • A column that follows only by coincidence (one value on nearly every row, or filled on fewer than half the identifier's rows) is not carried along.
  • Rows that disagree with the kept value are reported as quality item carried_value_disagrees, never dropped silently.
  • A tie keeps the smallest value, so reruns give the same result.
  • The evidence is written to the findings (derived_evidence).

False hierarchies

  • A yes/no flag spelled several ways (0, false, 1, true) is now a flag.
  • A parent level needs at least 10 rows outside its most common value. Two rows that happen to hold their own values prove nothing.
  • Columns that determine each other on 99% of rows (an id and its name, with a stray spelling) name one thing, not two levels.

Narration. Operator: "fix the skill to be more story telling ... i need to know what it is finding no more ... discussion and slop".

  • The narration sections of data-profiling and data-onboarding now ask for each update to be a finding, with numbers and meaning, never a description of the next step.
  • The profiler's progress lines say what each stage found: parts and row counts, entities carried, keys, links, classes and hierarchies.

Also

  • The dataset name is kept; the report title used to read "None".
  • A working copy the profiler creates for itself is now removed. Tests had left 188 behind, about 588 MB.
  • findings.md gains derived_from and §3.2, and states how a nested record's designed key is treated.
  • data-quality lists the new quality item.

Results

On the ownership cohort (3,367 filings):

  • The transaction counts match a direct count: 8,391 non-derivative and 1,528 derivative.
  • The issuer is a master (63 issuers, by CIK).
  • The filing and its tables are transactions.
  • The owner is reference at 0.857, just ahead of master at 0.833. It carries only a CIK and a name, which is indistinguishable from a code with its label. This is a question for the operator on ticket 07.
  • 3 hierarchies remain, all plausible: an owner's street within its state, with city and postal code under it; and each indirect-ownership description with one security title.

Verification

  • Tests: 206 profiling and data-quality tests pass, 15 of them new. Each new test fails without its fix.
  • Genericity lint: passes.
  • Three-axis review (Standards, Spec, GoF) of the first two commits is done, and the fixes are in. The GoF verdict was to leave the structure, and its suggested Part.is_input tidy-up is taken.
  • Trial B (non-SEC): 52 of 52, with the same score lines as before.
  • Trial A (SEC and GLEIF): still running. The first rerun ran out of disk and was stopped safely by the watchdog; the operator chose to prune the uv cache and retry. Its score goes on ticket 01d before merge.

Overlap guard

An earlier commit (the narration) ran while Grok held an uncommitted edit to the Examples section of data-onboarding/SKILL.md. The operator said "Commit both skills (Recommended)". After the rebase the guard is clear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FFKdv4nqKXKM9d5Cf2hEFk

Aneena Ananth and others added 4 commits October 10, 2026 06:59
- inputs: only lists of plain values are a table stored by column; equal-
  length lists of records (a document's transactions and holdings) stay
  separate parts, so single items join their own list and nothing is
  paired by position.
- embedded.py: an identifier that repeats, with a name-like column of the
  same object that follows it, becomes its own part (derived_from); the
  part it came from links to it.
- A nested record keyed by its parent and place counts as a key for
  classification (the findings still say designed).
- The dataset name is no longer overwritten (report title "None").
- SKILL.md modes table; tests for each.

Found on profiling ticket 07's insider ownership filings. Operator:
"Fix the profiler first (Recommended)"; "fix the skill once you find any
issue this is a standing instuction".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFKdv4nqKXKM9d5Cf2hEFk
- embedded: a near-constant or sparse column is not carried; evidence
  written (derived_evidence); rows disagreeing with the kept value are a
  quality item (carried_value_disagrees); ties keep the smallest value;
  name clashes said; no caller state changed.
- Part.is_input names the "read from an input as it is" rule.
- findings.md: derived_from, section 3.2, the designed child key.
- data-quality: the new item listed as new code.
- profile_inputs removes a working copy it made itself (188 left behind
  by tests since 2026-10-05).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFKdv4nqKXKM9d5Cf2hEFk
Operator, 2026-10-09: "fix the skill to be more story telling not quite i
need to know what it is finding no more stupid decussion and slop".

- data-profiling and data-onboarding: each update is a finding with its
  numbers and meaning; no announced steps, plans or reasoning; a step is
  named only when it blocks or takes long. The cadence, masking and
  approval rules stay.
- The run's progress lines say what each stage found (parts and rows,
  entities carried, keys, links, classes, hierarchies).

Overlap guard: grok/worker-replay holds an uncommitted 3-line edit in
data-onboarding SKILL.md's Examples (near line 589), apart from this section;
operator, 2026-10-09: "Commit both skills (Recommended)".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFKdv4nqKXKM9d5Cf2hEFk
- A flag spelled several ways (0, false, 1, true) is a flag.
- A parent level needs 10 rows outside its commonest value; two rows
  with values of their own prove nothing (minority_rows).
- Columns that determine each other on 99% of rows (an id and its name
  with a stray spelling) name one thing, not two levels.

Found on profiling ticket 07's ownership filings: all 6 hierarchies the
run reported were coincidences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFKdv4nqKXKM9d5Cf2hEFk
@paulananth
paulananth merged commit 5245cb8 into main Oct 10, 2026
6 checks passed
paulananth added a commit that referenced this pull request Oct 11, 2026
01d: Trial A rerun on main after #899 gives 38 of 41, every line identical
to the last result (the three known misses are record keys). #899's review,
PR and merge recorded. 06: #879's merge recorded; the re-check against
Codex's final design stays open (Issue 20 L7, L8). Map: 01d, 05 and 06
done; 08's 13F rows unblocked.

Co-authored-by: Aneena Ananth <aneenaananth@MacBook-Air.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
paulananth added a commit that referenced this pull request Oct 11, 2026
…#919)

Carried from claude/profiling-07-ownership (2026-10-09) onto today's main:
the ADV rules tick and #896's record, the Insider ownership section (the
parts #899 finished ticked), the ownership conversion script, map row 07.
The two ownership profiles are not committed: they hold owners' names and
addresses unmasked, a profiler sensitivity gap now on the ticket.

Co-authored-by: Aneena Ananth <aneenaananth@MacBook-Air.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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