Repository navigation
feat(dataop): lower a model into Specy .dataop (M25) - #56
Merged
Merged
Conversation
Section 26: a code graph lowered into a Specy Data & Operation model at the observed level. MM-7 typeExpr, MM-8 TWithReceiver and receiver on access edges, the lowering rules, the three properties that stand in for a .dataop parser, and what is deferred. Milestones and Decisions move to sections 27 and 28. The as-built notes of the four steps are under 26.8. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy
Contract 1.2.0. MM-7: an optional typeExpr on TTypedEntity, a closed union (named, primitive, array, nullable, function, union, variable, unevaluated) whose references are file-scoped surrogates on the wire. MM-8: the marker trait TWithReceiver and an optional receiver (self | other) on access edges. The Java profile licenses the marker on attribute, method and constructor. The analyzer stores both (model.db version 6, the dep view gains receiver) and validates receiver in conformance. Files at 1.0.0 and 1.1.0 still decode; no fixture snapshot moves. Schemas, METAMODEL.md and the website reference pages are regenerated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy
The Java extractor writes the type as written (generics, arrays, primitives, wildcards as unevaluated), marks instance members with TWithReceiver and states self or other on each field access. The fixture gains one wildcard case: OrderService.archive takes List<? extends Order>. Its snapshots and the explain goldens that read it are regenerated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy
New package @codegraph/dataop and the command codegraph dataop: a model printed as a Specy Data & Operation model at the observed level. Types become structs, fields schema fields or globals, invocables operations with depends on, uses, reads, writes and errors read from the edges. What the model does not hold is said as opaque, ? or a FINDING, never guessed. --boundaries marks entries from the entry inventory. An uncalled operation that no rule names is left unmarked and counted on stderr. No .dataop parser exists: three properties (lexical, closure, agreement with the graph) run on every fixture model, and fixtures/java/expected/model.dataop is the snapshot. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy
docs/dataop.md: what becomes what, entries, what the output says when the model does not hold a fact, what is not lowered. The command enters docs/cli.md, the README table and CLAUDE.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codegraph | cc869eb | Commit Preview URL Branch Preview URL |
Dec 01 2026, 11:02 AM |
Conflicts: Main.java keeps both the ancestor-call stats and the degraded type-node note; the Java profile keeps main's MM-6 wording and adds MM-7/MM-8. Generated files regenerated from the merged sources, not hand-merged: the Java snapshot and its metrics twin (+1 `post` edge on top of `receiver`), the explain goldens, profiles.md, and model.dataop (`LedgerAdapter.post` now uses LedgerClient via its super call). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgxrF7im9Dw2aPPefkD
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.
M25 (PLAN.md §26):
codegraph dataopprints a model as a Specy Data & Operation model (.dataop) at theobservedlevel: what data exists, what operations exist over it, and what each one depends on, uses, reads, writes and raises.(Spring PetClinic's
Owner, evidence lines removed.)Commits
docs(plan)feat(core)typeExpronTTypedEntity(a closed union, surrogates on the wire). MM-8: marker traitTWithReceiverand optionalreceiver: self | otheronaccessedges. The analyzer stores both (model.dbversion 6) and checksreceiverin conformance. Schemas, METAMODEL.md and the website reference pages regenerated.feat(extractor-java)archive(List<? extends Order>)); its snapshots and the explain goldens follow.feat(dataop)@codegraph/dataop(lower,print, type tables as data) and the command. Snapshot:fixtures/java/expected/model.dataop.docsdocs/dataop.md,docs/cli.md, README, CLAUDE.md.Compatibility
typeExprnor the marker. Their models lower through a stated fallback: every field is a schema field, every method attached, and the output's header says so.Verification
./mvnw packageexits 0, 255 tests, on the committed tree.500158f, spring stack table): 25 structs, 109 operations, 36entry.Owner,OwnerRepositoryandOwnerControllerwere read against their source by hand and match: fields, flattened supertype fields, every call, the three cyclomatic counts.analyzer/test/scale.test.tstimed out once (5.8 s against 5 s) when the whole workspace ran in parallel. It takes 1.25 s alone, and the same on a tree without this work.Read these before merging
@"…"quoted names,uses { … },= opaque,on module, parameter writes, coded// FINDING:lines, the "observable effect" rule). They are written in the Specy metamodels repository but not committed there. Until they are,docs/dataop.mdpoints at a grammar that the published one does not match.this.owners.save(owner)appears in no clause on PetClinic, because the model holds no edge for it. feat(extractor-java): charge inherited calls #55 adds that edge. Both PRs regeneratefixtures/java/expected/model.jsonl, its metrics snapshot and the explain goldens, and both editEdgeExtractor.java,Main.java, the Java profile and PLAN.md, so the second to land needs a rebase and a regeneration (model.dataopincluded). The paragraph on that call indocs/dataop.md§4 goes away then.packages/dataopwas written code-first. Its tests came after the code; six mutants, all caught, stood in for the failing-test step. It deserves a reviewer's eye more than the rest..dataopparser exists. Three properties stand in for one on every fixture model: every token is legal, every reference resolves, every clause item is backed by an edge and every edge is declared or counted.Decisions taken
// NOTE:names the supertypes.operation new(…): Struct on module.--boundaries, an uncalled operation that no rule names is not markedentry?; stderr counts those rows. Specy says the mark does not mean "nothing calls it".Deferred (§26.10)
Flows, contracts, states and descriptions (for a walk to write); candidate lineage;
typeExprand the receiver in the other five extractors; the website page.🤖 Generated with Claude Code
https://claude.ai/code/session_01PKCVgyFAm1UifToEYGcjCy