Skip to content

Commit 383018c

Browse files
committed
polish(pull,docs): use ⬆️/⬇️ for drift direction; disambiguate from πŸ“ (file written)
The drift-direction-classifier feature overloaded πŸ“ in pull output: it meant both 'engine wrote a file to disk' (pre-existing) AND 'local ahead of dashboard, preserved' (new). In mixed-direction pulls these appear on adjacent lines and the disambiguation-by-suffix is mild but real. Pull-output icon legend (new mental model): ⬆️ = local-ahead, needs to flow UP to dashboard (preserved) ⬇️ = --resolve=theirs, flowed DOWN (overwrote local with platform) πŸ“ = engine wrote/updated a file on disk (routine I/O) ✏️ = locally modified per git, preserved πŸ”’ = platform-default (read-only) 🚫 = matched .vapi-ignore πŸ—‘οΈ = locally deleted (intent recorded in state) Swapped sites (5 in src/pull.ts): - :882 classifier local-ahead log - :1088 resolveBothDiverged --resolve=ours log (already ⬆️ via earlier commit) - :1134 printDriftSummary local-ahead row - :1356 end-of-pull legend - new end-of-pull legend now also documents ⬇️ and πŸ“ separately The 'wrote file to disk' πŸ“ (lines 987, 998) is unchanged β€” that's the pre-existing semantic and the one this feature should NOT have collided with. AGENTS.md gains: - The full icon legend table (mental model: ⬆️ flows up, ⬇️ flows down, πŸ“ is routine I/O). - A first-adoption-noise callout (L1 from code review): the first audit after this feature lands surfaces no-baseline info findings for every resource that predates lastPulledHash tracking. Info severity does NOT block CI; --bootstrap clears them all in one shot, or they naturally drain over the next few sync cycles. Closes L1 (first-adoption noise documentation) and NIT (icon overload) from the code review on this PR. No behavior change \u2014 cosmetic + docs only. Tests: 266/266 green, tsc --noEmit clean.
1 parent 61cee3c commit 383018c

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

β€ŽAGENTS.mdβ€Ž

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ Runs the engine's local validators against every YAML/MD file in the org without
101101

102102
`--force` skips all of this and just overwrites local with dashboard. Use it ONLY when you literally need to nuke local and re-materialize dashboard truth (rare). Plain pull is the DEFAULT for both humans and agents; `--force` is the escape hatch.
103103

104+
**Pull-output icon legend.** Distinct semantics in a single pulled-resource line:
105+
106+
| Icon | Meaning |
107+
|------|---------|
108+
| `πŸ“` | Engine wrote/updated a file on disk (clean / no-baseline path) |
109+
| `✨` | Engine created a NEW file on disk (first-time pull of this resource) |
110+
| `✏️` | Locally modified file detected by git, preserved as-is |
111+
| `⬆️` | `local-ahead` β€” local has unpushed edits, needs to flow UP to dashboard (preserved) |
112+
| `⬇️` | `--resolve=theirs` β€” overwrote local with dashboard (flowed DOWN) |
113+
| `πŸ”’` | Platform-default resource (read-only, immutable) |
114+
| `🚫` | Matched `.vapi-ignore` (not tracked locally) |
115+
| `πŸ—‘οΈ` | Locally deleted (deletion intent recorded in state) |
116+
117+
Mental model: `⬆️` flows UP (push), `⬇️` flows DOWN (pull-overwrite), `πŸ“` is the engine doing routine file I/O.
118+
119+
**First-adoption noise on customer repos.** The first `npm run audit -- <org>` after upgrading to a version with the content-drift rule will surface `[content-drift] [no-baseline]` info findings for every resource whose state row predates `lastPulledHash` tracking. These are info-severity (do NOT block CI), but the noise is real. Two ways to clear:
120+
- `npm run pull -- <org> --bootstrap` β€” refreshes state with the current platform-hash baseline, no resource materialization. One-shot fix for the whole fleet.
121+
- Or just let them sit β€” each plain `npm run pull` after this writes `lastPulledHash` for whichever resources it touches, so the no-baseline rows naturally drain over the next few sync cycles.
122+
104123
### `npm run push -- <org>` β€” raw push, no pre-pull
105124

106125
Skips the merge pass. Only use when (a) you literally just ran `pull` and (b) you're certain no one has touched the dashboard since. In a multi-developer environment or when dashboard editors are in play, default to `apply` instead. Stale local state can clobber recent dashboard edits or PATCH against UUIDs that no longer exist.

β€Žsrc/pull.tsβ€Ž

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,11 @@ export async function pullResourceType(
875875
}
876876

877877
if (direction === "local-ahead") {
878+
// ⬆️ β€” local has unpushed edits, needs to flow UP to dashboard.
879+
// Distinct from πŸ“ (= engine wrote a file to disk) to avoid icon
880+
// overload in mixed-direction pulls.
878881
console.log(
879-
` πŸ“ ${resourceId} (local ahead of dashboard) ${formatDriftLabel(direction)}`,
882+
` ⬆️ ${resourceId} (local ahead of dashboard) ${formatDriftLabel(direction)}`,
880883
);
881884
upsertState(newStateSection, resourceId, { uuid: resource.id });
882885
skipped++;
@@ -1128,7 +1131,7 @@ function printDriftSummary(counts: DriftDirectionCounts): void {
11281131
}
11291132
if (counts["local-ahead"] > 0) {
11301133
lines.push(
1131-
` πŸ“ local-ahead : ${counts["local-ahead"]} (run npm run push to propagate local edits up)`,
1134+
` ⬆️ local-ahead : ${counts["local-ahead"]} (run npm run push to propagate local edits up)`,
11321135
);
11331136
}
11341137
if (counts["both-diverged"] > 0) {
@@ -1350,7 +1353,9 @@ export async function runPull(options: PullOptions = {}): Promise<PullResult> {
13501353
);
13511354
console.log(" 🚫 = matched .vapi-ignore (not tracked)");
13521355
console.log(" ✏️ = locally modified (preserved)");
1353-
console.log(" πŸ“ = local ahead of dashboard (preserved)");
1356+
console.log(" ⬆️ = local ahead of dashboard (preserved)");
1357+
console.log(" ⬇️ = both diverged, --resolve=theirs (overwrote local)");
1358+
console.log(" πŸ“ = engine wrote/updated file on disk");
13541359
console.log(" πŸ—‘οΈ = locally deleted (intent in state)");
13551360
console.log(
13561361
` Run with --force to overwrite: npm run pull -- ${VAPI_ENV} --force`,

0 commit comments

Comments
Β (0)