opyeb envmask

Comparing prod and staging config

2026-11-29 · 2 min read

One line: flatten both files to the same key paths and compare with values masked; the real differences stand out and nothing leaks.

Why structural

A text diff treats a reordered line as a change. YAML flips on indentation, JSON on key order, and the result is noise.

A structural comparison flattens both files to key paths (db.host, servers[0].url) and compares value and type. Reordering disappears; real differences remain.

Compare with values masked

Prod and staging passwords naturally differ. Putting the raw values side by side exposes them in a screen share or screenshot.

The compare tab masks before comparing. Partial masking keeps the last characters, so a changed value is visible while the original stays hidden. Hash mode shows only same or different.

Differences that matter

Check these before a deploy.

Difference types
TypeExampleWhat to check
ChangedAPI_BASE_URLthat a staging URL did not reach production
AddedCACHE_TTLa flag that exists only in staging
RemovedLOG_LEVELwhether production now runs on a default
Retypedreplicas: 1 → "3"a string that disables scaling
SecretDB_PASSWORDthat two environments did not swap keys

Limits of flattening

Arrays are compared by index. Inserting an item at the top makes every later index look changed. Check ordered lists separately.

YAML anchors and aliases are compared expanded, and comments are not part of the comparison.

Pre-deploy check

When you paste the result into a pull request, keep keys and changes, not values.

Questions

Can I compare encrypted values?

Ciphertext differs even when the plaintext matches, so a diff tells you nothing. Compare at the plaintext stage and do not share the result.

Can I compare more than two files?

The workbench compares two. With more files, pair them by environment and compare in order.

Sources

Every example here can be pasted into the workbench as it is.

Open the workbench