The Second Layer: Objects, AI, and Operational Truth
Source asciidoc: `docs/article/the-second-layer-objects-ai-operational-truth.adoc`
© 2026 Oleksandr Tishchenko / Marketing America Corp LLC. Distribution is permitted only with reference to the author and the original source.
Abstract
This is not a set of unrelated articles about object-oriented programming, AI, Symfony, writing, and developer tools.
It is one path of thought: from a correct canonical answer toward a more precise engineering model of reality.
The path starts with a simple question about objects and state. It passes through dialogue with two language models, through the problem of observing broken runtime systems, through the responsibility of authorship in AI-assisted writing, and through the changing role of developer tooling in the AI era.
The central thesis is this:
AI can give the correct first layer. The engineer must build the second layer: boundary, time, observation, runtime behavior, model correctness, projection, and responsibility.
Related Published Articles
This wrapper connects the object-state cycle with several already published articles in the Documentation repository:
Why This Cycle Exists
Most engineering mistakes do not begin with an obviously wrong answer.
They begin with a correct answer that is too compressed.
Object-oriented programming gives us one of those answers:
An object has identity, state, and behavior.
This definition is useful. It is classical. It is teachable. It appears in books, courses, conference talks, documentation, and countless explanations produced by both humans and AI.
But the phrase hides a problem.
State — at what moment?
Observed by whom?
Measured how?
Inside which model?
For which decision?
This cycle began with that pressure point. The opening question was deliberately incomplete:
An object is when an entity has properties and states. Is that so?
The same line of questioning was taken through ChatGPT and Claude. Both models reproduced the canonical answer. Both were correct. Both were incomplete. And both, through dialogue, arrived at a deeper idea:
State is not the complete truth about an object. State is an observed, stored, diagnosed, or computed slice of an object within a specific model and at a specific boundary of time.
This is not a rejection of state.
It is a rejection of the idea that state is the whole object.
The Core Article: Object, State, Observation, and Invariants
This is the center of the cycle.
It revisits the classical definition of an object through a moving car, tire tread measurement, business orders, wallets, vendors, observable projections, and model invariants.
A moving car has speed, fuel level, tyre tread depth, corrosion, battery voltage, and many other characteristics. But not all of them are available at every moment. To measure tyre tread depth, the car must be stopped. It must be placed into a diagnostic mode.
The car did not stop being a car before the measurement. The property did not disappear. But the observation required a frame.
The same is true in software.
An Order entity with status and total fields is not the full truth about an order. The real business object may include payment attempts, review processes, shipment state, partial fulfillment, refunds, external provider state, audit events, support history, manual corrections, and other facts that do not fit inside two fields.
The entity is model-local memory. The database row is a snapshot. The API response is a projection. The log is a trace. The event is an artifact. The object itself is a unit of behavior passing through time.
The article’s strongest tool is the distinction between four layers of truth:
Runtime truth -- what actually happened during execution
Engine truth -- what logic is actually embedded in the code
Model truth -- what rules the selected model treats as valid
Observed truth -- what an external observer can infer
A bug is not the absence of truth.
A bug is a conflict between engine truth and model truth.
This matters because a defective Wallet object may reliably subtract money and produce a negative balance. Mechanically, it is predictable. In model terms, it is wrong.
So the stronger formulation is not that objects magically protect invariants. Bad code exists.
The stronger formulation is:
In a correct implementation, an object should localize and execute the rules that the model treats as invariants.
This is longer than the canonical definition because the short version hides too much.
Start here.
The Meta-Article: When AI Answers Correctly, But Not Completely
This article explains the experiment itself and compares the two AI-assisted branches of the object-state discussion.
It is important because it does not attack AI. It diagnoses the discourse that AI reproduces.
The first answer from a language model is often not wrong. It is often the answer most heavily repeated in the literature. In this case, the models returned the canonical layer: identity, state, behavior, encapsulation, messages, invariants, behavior over raw setters.
That layer is useful.
But the deeper question starts after it.
AI reproduces what it was taught — and it was taught what the majority wrote. The majority reproduces Booch, without asking: what is "state" in itself?
That is not the fault of the tool. It is a diagnosis of the material from which the tool learned.
There is also an editorial responsibility here. The meta-article makes the comparison explicit: one branch is stronger as a philosophical and ontological provocation, while the other is stronger as an engineering model. As an editorial instrument proposed during the preparation of this wrapper, the following comparison frame may help:
| Criterion | ChatGPT | Claude |
|---|---|---|
Structure |
Stronger |
Softer |
Narrative flow |
Drier |
Stronger |
Ontological precision |
More explicit |
More image-based |
Engineering applicability |
Higher |
Medium |
Publication force |
Medium |
Higher |
The meta-article is not a ranking exercise. Its value is that two AI-assisted branches, prompted through the same conceptual path, expose what is stable in the thought and what is merely style.
The Technical Consequence: Symfony DI Harvest
-
Fail-Fast Is Not Enough: Why Symfony Needs Runtime DI Harvesting in the Age of AI Agents
Related published context: Vibe Coding Is Not the Problem and AI-First Software Delivery and the New Geometry of Control.
At first glance, this article looks separate from the object-state thesis.
It is not.
The object-state article says:
The first visible state of an object is not the complete truth about the object.
The Symfony DI Harvest article says:
The first visible container error is not the complete map of breakage.
Both are the same pattern: a single observable projection is mistaken for the whole.
Symfony’s fail-fast behavior is correct for normal development. One error appears. The developer fixes it. The loop continues.
But AI-assisted development changes the scale. An agent may generate or refactor controllers, services, repositories, event subscribers, Messenger handlers, configuration files, tests, and integration layers in one wave. After that, the application may contain twenty or fifty dependency-injection failures.
The first error is still true.
It is just not enough.
DI Harvest proposes a diagnostic mode for already-broken applications: collect the widest reliable map of reachable container failures, classify them by confidence and repair strategy, and export structured output for humans, CI, and AI agents.
{
"type": "missing_interface_alias",
"confidence": "medium",
"suggested_action": "Add a dev/default alias from MetricsPort to one selected implementation."
}
For a developer, this becomes a prioritized checklist.
For an AI agent, it becomes a grouped repair plan instead of one error per cycle.
The boundary must be clear:
|
This is not production behavior. This is a forensic diagnostic mode for already-broken applications. |
Once that boundary is explicit, the article becomes the most technically concrete extension of the cycle.
The Editorial Consequence: Why People Do Not Read AI Content
This article is not about OOP directly.
It explains why the other articles in the cycle are not merely AI-generated text and why authorship, judgment, verification, and structure become more important after AI enters the workflow.
The diagnosis is direct:
People do not reject AI content because AI touched it. They reject it when nobody is responsible for the text.
No position. No friction. No risk. No lived constraint. No authorial judgment.
The OOP cycle avoids that trap because it takes a position:
-
the canonical answer is correct but insufficient;
-
state exists, but only inside a frame;
-
objects are not bags of fields;
-
projections are not the whole object;
-
invariants are model boundaries, not magic;
-
the first error is not the whole broken system;
-
AI gives the first layer, but engineering work begins after that.
One article in the cycle carries different metadata from the rest. For publication as a unified cycle under the editorial canon stated at the top of this document, authorship should be normalized consistently across all five texts.
There is also an interesting structural tension worth noting. The article criticizes predictable AI structure while itself using a practical "five problems plus fixes" format. That is acceptable: this text is a checklist and an editorial tool, not the philosophical core of the cycle. The checklist form is honest here.
The Contextual Consequence: Developer Tools After AI
This is the most contextual article in the cycle.
If read as a fixed list of tools, any article in this area will age.
If read as a principle, the topic belongs.
The principle is:
AI eats the interpretive layer. It does not eat operational reality.
AI can explain syntax, generate a regex, summarize a command, or transform a small snippet. That makes many old developer websites less central.
But AI does not replace a live webhook endpoint. It does not replace a browser compatibility matrix. It does not replace an execution surface. It does not replace a visual inspection tool for real payloads. It does not replace measurable artifact transformation.
This connects directly to the object-state thesis.
AI can explain an object quickly.
But a precise engineering model still requires operational boundaries, observable projections, runtime behavior, diagnostics, and model correctness.
The specific list of websites may change. The filter should remain.
How to Read the Cycle
These five articles can be read in any order, but there is a sequence that follows the logic of the argument:
-
Start with the object-state article. It contains the thesis and vocabulary.
-
Read the AI comparison article second. It explains why the canonical answer was correct but incomplete.
-
Read the DI Harvest article third if you work with Symfony, AI-assisted development, or runtime diagnostics.
-
Read the AI-content article as an editorial manifesto and self-check.
-
Read the AI-first delivery and vibe-coding articles as contextual closing frames about operational reality, control, and engineering responsibility after AI.
What This Cycle Is Not
This cycle is not a tutorial on OOP fundamentals.
It is not a model ranking exercise.
It is not an argument that Booch, Meyer, Evans, Fowler, or the classical OOP vocabulary are wrong.
The point is not to discard the canon.
The point is to stop treating the canon as the finished building.
Classical vocabulary is scaffolding. It helps us climb. But scaffolding is not the building.
Why Two AI Analyses Were Used
Before this wrapper article was written, two independent analyses of the cycle were produced: one by ChatGPT and one by Claude.
Both were given the same source material.
Both identified the same core article.
Both identified the same connection between object-state observation and DI Harvest diagnostics.
Both identified the missing wrapper as the main publication problem.
But each also saw risks the other missed.
ChatGPT emphasized the danger that "state is not absolute" may be misread as "state does not exist." The correction is essential:
We are not denying state. We are denying the idea that state is the whole object.
Claude emphasized the authorship inconsistency, the symmetry problem in the ChatGPT/Claude comparison, and the fact that the AI-content article criticizes predictable structure while using a predictable checklist form.
The wrapper article exists because both maps were useful.
The final editorial responsibility, however, belongs to the author.
The Line Through All Five Articles
These articles form one path:
from object to state, from state to observation, from observation to diagnostics, from diagnostics to AI-assisted engineering, from AI output to authorial responsibility.
The pattern repeats:
-
a canonical answer may be correct but incomplete;
-
a first observation may be real but partial;
-
a visible state is not the whole object;
-
a first exception is not the whole broken system;
-
an AI draft is not yet authored meaning;
-
a tool that explains is less durable than a tool that verifies, executes, measures, or diagnoses.
Conclusion
The future of engineering thought is not about rejecting the canon.
It is about refusing to stop at the first correct sentence.
An object is not merely identity, state, and behavior.
A broken container is not merely the first exception.
An AI-generated answer is not the end of thought.
A readable article is not a clean structure without responsibility.
A developer tool is not important because it explains something. It is important when it touches operational reality.
The canon gives the first layer.
The engineer builds the second.
And that second layer is where the real work begins.