The Hidden Contract Between Your Code and Your Trust Tokens

Gleb Sokolov

Hatched by Gleb Sokolov

May 05, 2026

10 min read

38%

0

What do a file you ignore and a token you sign have in common?

At first glance, almost nothing. One is a refusal: a deliberate decision to keep certain files out of version control. The other is an assertion: a compact, signed statement that says, in effect, this information can be trusted. Yet both are really about the same deeper problem: how systems decide what deserves to be admitted, preserved, or believed.

That is a surprisingly human problem. We spend most of our time building systems that do not just process information, but sort it. Some data should be tracked. Some should be hidden. Some should be authenticated. Some should expire. The real challenge is not simply storing things correctly, but drawing the boundary between what is part of the system and what is intentionally outside it.

The smallest design choices often reveal the deepest philosophy. A file ignored by size and a JWT carrying issuer, subject, issued-at time, and expiry are both boundary objects. One says, “this is too noisy, too heavy, or too dangerous to belong in the repository.” The other says, “this message is lightweight enough to travel, but structured enough to be trusted.” Together they point to a powerful idea: healthy systems are not defined by what they include, but by the rules they use to exclude and certify.


The real job of a system is not inclusion, it is filtration

Most people think engineering is about adding features. But at scale, engineering becomes a discipline of filtration. You start by asking what should be committed, what should be authenticated, what should expire, what should be recomputed, and what should never be treated as authoritative in the first place.

This is where file size and token payloads begin to rhyme. A large binary artifact in a repository is not just a nuisance. It is a signal that the wrong layer is holding the wrong responsibility. The repository should contain source, not build outputs, not vendor blobs, not ephemeral junk. Likewise, a JWT should contain just enough information to make a decision, not a whole database record disguised as a token. The compactness is not an aesthetic preference. It is a design constraint that protects the system from entropy.

A useful mental model is to think in terms of trust surfaces. Every system has surfaces where it accepts input, transmits state, or stores memory. The larger and more ambiguous those surfaces become, the more expensive the system gets to reason about.

Consider three examples:

  1. A repository that includes massive files because “they are useful to have around” eventually becomes slow, brittle, and politically hard to maintain.
  2. A token that embeds too much data becomes hard to revoke, easy to misunderstand, and dangerous if stolen.
  3. A rule set that ignores neither files nor claims, that treats everything as equally important, creates a system with no edges, which is another way of saying no discipline.

In each case, the failure is not excess information alone. The failure is misplaced permanence. A file committed to git feels durable. A signed token feels authoritative. But not everything durable should be in version control, and not everything authoritative should be stored forever.

Good systems do not merely store facts. They decide which facts are allowed to become history.

That is why the smallest question often matters most: should this thing live here at all?


Size is a proxy for a deeper architectural smell

It is tempting to treat file size as a practical concern, nothing more. Large files are slow, annoying, and sometimes exceed limits. But size is usually a symptom, not the disease. If a file is too large to belong comfortably in git, the issue is often that the file is playing the wrong role.

A repository is excellent at capturing intentional change. It is poor at capturing accumulated mass. The same distinction applies to JWTs. A token is excellent at carrying a concise, signed claim set across boundaries. It is poor at carrying rich, mutable state. When either one is overloaded, the architecture starts to blur.

This is why size can be a useful diagnostic. Big files in a repository often indicate one of four problems:

  • Generated artifacts are being mistaken for source
  • Data is being stored in the wrong lifecycle
  • A boundary between system layers has collapsed
  • The team is using convenience to hide design debt

JWTs can suffer from analogous problems. A large token often means claims are being used as a substitute for state retrieval, authorization logic, or profile storage. That creates a false economy: fewer database calls now, but more complexity later. You gain a tiny bit of speed at the cost of security, revocability, and clarity.

The deeper pattern is this: when a thing gets too big for its container, the container is telling you what it is for.

A git repository is not a warehouse. A JWT is not a database. The moment you ask either one to become its opposite, you have crossed a boundary that design tried to warn you about.

A useful test: lifecycle fit

Instead of asking, “Can I put this here?”, ask:

  • Does this object belong to the same lifecycle as the container?
  • Will it change at the same rate?
  • Can it be reproduced, refreshed, or regenerated if lost?
  • Does storing it here improve understanding, or merely delay another decision?

If the answer is no, the object may be too large, too dynamic, or too stateful for the place you want to put it.

That is why some problems look like performance issues but are really governance issues. Size exposes where your system has failed to separate source from output, identity from profile, and claims from truth.


JWTs and git both live or die by what they leave out

The most interesting thing about a signed token is not what it says, but what it omits. It contains a compact set of claims, such as issuer, subject, issued at, and expiration. Those claims do not describe the whole world. They describe just enough to make a trust decision without dragging the entire system into every request.

That same discipline is exactly what good version control demands. A repository is most useful when it tracks the essential expressions of change, not every byproduct of development. Ignore the wrong files, and you lose useful evidence. Track too much, and you bury meaning under noise.

This is the paradox: reliability comes from strategic absence.

The best systems are not comprehensive. They are selective. They ask each object to justify its presence.

A compact JWT works because it is not trying to be the source of truth for everything. It carries enough information to authenticate and authorize, then gets out of the way. A lean repository works because it captures the minimum set of files needed to reproduce the system's intent, while excluding the ephemeral, the generated, and the bulky.

The analogy becomes even sharper when you think about compromise. If a JWT is stolen, its damage is constrained by the claims it contains and the time window in which it is valid. If a repository is polluted with giant files or secrets, the blast radius increases because the boundary has already been weakened. In both cases, overinclusion expands risk.

That is why precision is a security property. It is also a maintenance property, a collaboration property, and a cognitive property. Systems that are precise are easier to audit because they have fewer lies in them.

A small, well-formed artifact is not a minimalist flourish. It is an epistemic commitment.

It says: this object means one thing, serves one role, and expires or changes according to rules that are visible.


A framework for deciding what belongs where

If both git hygiene and token design are really about boundaries, then the practical question becomes: how do you make better boundary decisions?

Here is a framework that works across both domains. Call it the Four Lenses of Admission.

1. Source lens

Ask whether the item is a source of truth or merely a derivative.

If it is generated, compiled, exported, or reproducible from something else, it probably should not live in the same place as the source. Build outputs, caches, large binaries, and temporary artifacts usually fail this test.

For JWTs, the source lens asks whether the claim belongs in the token or should be resolved from authoritative storage. If the answer lives elsewhere, do not duplicate it in the token just because it is convenient.

2. Lifecycle lens

Ask whether the item changes on the same schedule as the system around it.

Repository contents tend to have a development lifecycle. Tokens have a much shorter security lifecycle. If you let them absorb objects with wildly different rhythms, you create friction. A file that changes every run, or claims that should expire every minute but are treated as long-lived, both reveal lifecycle mismatch.

3. Blast radius lens

Ask what happens if the item is copied, cached, leaked, or stale.

Large ignored files in git can bloat clones and backups. Overstuffed JWTs increase exposure if intercepted. The more an object contains, the more damage it can do if handled incorrectly.

4. Reconstructability lens

Ask whether the item can be rebuilt when needed.

If yes, it belongs closer to its recipe than its output. If not, it may deserve special treatment, but that should be a conscious exception, not an accident. This is where teams often make their most expensive mistakes, confusing convenience with necessity.

This framework shifts the question from “What can I fit?” to “What deserves to persist here?” That is a much healthier question.


The hidden tradeoff: convenience versus clarity

Why do people overfill repositories and tokens in the first place? Because convenience is seductive. It feels efficient to keep everything nearby. It feels clever to stuff more into a token and avoid another lookup. It feels tidy to ignore a file by size and move on.

But convenience often hides a bill. You borrow speed today by confusing layers, and later you pay in debugging time, security review, onboarding complexity, and system brittleness.

A repository full of large or inappropriate files becomes hard to clone, review, diff, and trust. A JWT full of unnecessary claims becomes hard to secure, rotate, and reason about. In both cases, the system loses its shape. And once shape is lost, the cost is not only technical. It becomes organizational. Teams stop knowing where truth lives.

That is the ultimate anti-pattern: a system where no one can tell whether a fact should be stored, derived, signed, or ignored.

The best engineering cultures build muscle around refusal. They know when to say no to another file, another claim, another shortcut. Not because they are minimalist for its own sake, but because every yes to inclusion is also a decision about responsibility.


Key Takeaways

  • Treat boundaries as architecture, not housekeeping. Decisions about what to ignore or include define the shape of the system.
  • Use size as a warning light, not a metric of annoyance. When something is too large for its container, the real problem is often lifecycle or responsibility mismatch.
  • Keep tokens compact and claims minimal. A JWT should carry only what is needed for trust decisions, not everything that could be fetched elsewhere.
  • Prefer reproducibility over retention. If something can be regenerated, stored output is usually the wrong thing to version or sign.
  • Ask the lifecycle question before the storage question. First decide where truth belongs, then decide where convenience is acceptable.

The strongest systems know what not to keep

We often celebrate systems for what they can hold. But maturity shows up in something subtler: the ability to exclude with confidence. A good repository does not try to preserve every byte of work history. A good JWT does not try to carry every fact about a user. Both succeed by being narrow, intentional, and legible.

That is the deeper connection between ignoring a file and signing a claim. Each is an act of governance. Each says that the system is not a dumping ground for everything adjacent to it. Each draws a line between what must be remembered and what must remain elsewhere.

So the next time you consider adding a file to version control or a claim to a token, ask a better question than whether it is possible. Ask whether it is truthful for that layer to remember it. The answer will often reveal more than performance, more than security, more than convenience. It will reveal whether the system has a boundary at all.

And once you start seeing boundaries this way, you realize something unsettling and useful: good architecture is not the art of keeping more. It is the art of knowing what should never have been kept there in the first place.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣