The PDF includes all three identifiers. Copy one into its field below. The original invoice number remains unchanged.
+
+
+
What the result can tell you
+
A checksum can reject mistyped input before a lookup. It cannot grant access or identify the caller.
+
A different complete valid code still finds a different record. Confirm the record before acting.
+
The short alias needs a mapping and uniqueness rules. RefMint is longer and adds a dependency.
+
Existing hostname search can return useful partial matches; RefMint requires a complete code.
+
“Logical lookups” count calls in this in-memory fixture, not network requests or database latency. No enrollment ID, credential, invoice number or tax identifier is replaced.
+
+
+
diff --git a/examples/workflows/invoice-data.json b/examples/workflows/invoice-data.json
new file mode 100644
index 0000000..97792ab
--- /dev/null
+++ b/examples/workflows/invoice-data.json
@@ -0,0 +1,8 @@
+{
+ "invoice_number": "INV-2026-000042",
+ "database_id": "42",
+ "alias": "D1042",
+ "reference": "INVOICE_1PQP2-UYWU-CW",
+ "lookup_url": "http://127.0.0.1:4173/workflows/",
+ "warning": "DEMONSTRATION ONLY - NOT A TAX INVOICE"
+}
diff --git a/examples/workflows/model.mjs b/examples/workflows/model.mjs
new file mode 100644
index 0000000..a36efe0
--- /dev/null
+++ b/examples/workflows/model.mjs
@@ -0,0 +1,75 @@
+// Local fixture, not Octofleet/Invoice Builder's implementation or production data.
+import { createReferenceCodec } from '../../dist/codec.js';
+
+export const domains = ['fleet', 'invoice'];
+export const routes = ['existing', 'alias', 'refmint'];
+export const records = Object.freeze([
+ Object.freeze({ domain: 'fleet', id: '550e8400-e29b-41d4-a716-446655440000', existing: 'press-07', alias: 'A1042', owner: 'demo-team' }),
+ Object.freeze({ domain: 'fleet', id: '550e8400-e29b-41d4-a716-446655440001', existing: 'press-08', alias: 'A1043', owner: 'demo-team' }),
+ Object.freeze({ domain: 'fleet', id: '550e8400-e29b-41d4-a716-446655440002', existing: 'press-09', alias: 'A1044', owner: 'other-team' }),
+ Object.freeze({ domain: 'invoice', id: '42', existing: 'INV-2026-000042', alias: 'D1042', owner: 'demo-team' }),
+ Object.freeze({ domain: 'invoice', id: '43', existing: 'INV-2026-000043', alias: 'D1043', owner: 'demo-team' }),
+ Object.freeze({ domain: 'invoice', id: '44', existing: 'INV-2026-000044', alias: 'D1044', owner: 'other-team' })
+]);
+
+export function codec(domain) {
+ if (!domains.includes(domain)) throw new Error('unknown domain');
+ return createReferenceCodec({ prefix: domain === 'fleet' ? 'asset' : 'invoice', kind: domain === 'fleet' ? 'uuid' : 'uint64', version: 1 });
+}
+
+export function identifier(record, route, printed = false) {
+ if (!routes.includes(route)) throw new Error('unknown route');
+ if (route !== 'refmint') return record[route];
+ const c = codec(record.domain);
+ const value = record.domain === 'fleet' ? record.id : BigInt(record.id);
+ const id = c.encode(value);
+ return printed ? c.format(id).toUpperCase() : id;
+}
+
+export function lookup(domain, route, input, actor = 'demo-team') {
+ const c = codec(domain);
+ if (!routes.includes(route)) throw new Error('unknown route');
+ if (typeof input !== 'string' || input.length > 128 || !input.trim()) return { status: 'invalid', reason: 'input', queries: 0 };
+ let matches;
+ if (route === 'refmint') {
+ const result = c.diagnose(input);
+ if (!result.ok) return { status: 'invalid', reason: result.error, queries: 0 };
+ matches = r => r.id === String(result.value);
+ } else {
+ const query = input.trim().toLowerCase();
+ // Fleet's existing baseline supports hostname substring search; invoice/alias
+ // use exact strings. This deliberately does not recreate either upstream app.
+ matches = r => route === 'existing' && domain === 'fleet'
+ ? r.existing.toLowerCase().includes(query) : r[route].toLowerCase() === query;
+ }
+ // Apply the same scope to every route. In production this belongs on the server.
+ const found = records.filter(r => r.domain === domain && r.owner === actor && matches(r));
+ if (!found.length) return { status: 'not_found', queries: 1 };
+ if (found.length > 1) return { status: 'ambiguous', queries: 1, matches: found.length };
+ return { status: 'found', queries: 1, record: { id: found[0].id, label: found[0].existing } };
+}
+
+export function changedSymbol(input) {
+ return input.slice(0, -1) + (input.endsWith('q') ? 'p' : 'q');
+}
+
+export function scenarios(domain, route) {
+ const [target, neighbor, denied] = records.filter(r => r.domain === domain);
+ const original = identifier(target, route);
+ const otherDomain = records.find(r => r.domain !== domain);
+ const unknown = { ...target, id: domain === 'fleet' ? target.id.slice(0, -1) + 'f' : '99', existing: 'missing-99', alias: 'Z9999' };
+ // Select a one-symbol neighbor for the plain identifiers. The corresponding
+ // RefMint case changes one symbol WITHOUT recomputing its checksum.
+ const typo = route === 'refmint' ? changedSymbol(original) : identifier(neighbor, route);
+ return [
+ { name: 'Exact', input: original, expected: 'found', intended: target.id },
+ { name: 'Printed / pasted', input: ` ${identifier(target, route, true)} `, expected: 'found', intended: target.id },
+ { name: 'One-symbol change', input: typo, expected: route === 'refmint' ? 'invalid' : 'found', intended: target.id },
+ { name: 'Truncated', input: original.slice(0, -1), expected: route === 'refmint' ? 'invalid' : domain === 'fleet' && route === 'existing' ? 'ambiguous' : 'not_found', intended: target.id },
+ { name: 'Wrong record type', input: identifier(otherDomain, route), expected: route === 'refmint' ? 'invalid' : 'not_found' },
+ { name: 'Valid but unknown', input: identifier(unknown, route), expected: 'not_found' },
+ { name: 'Outside allowed scope', input: identifier(denied, route), expected: 'not_found' },
+ { name: 'Another valid code', input: identifier(neighbor, route), expected: 'found', intended: target.id },
+ { name: 'Empty', input: '', expected: 'invalid' }
+ ];
+}
diff --git a/examples/workflows/pdf.py b/examples/workflows/pdf.py
new file mode 100644
index 0000000..0dcb3ea
--- /dev/null
+++ b/examples/workflows/pdf.py
@@ -0,0 +1,102 @@
+"""Build/check a deterministic one-page demo; replay identifiers extracted from its PDF."""
+import argparse
+from io import BytesIO
+import json
+from pathlib import Path
+import subprocess
+import tempfile
+
+from pypdf import PdfReader
+from reportlab.pdfgen.canvas import Canvas
+from reportlab.lib.colors import HexColor
+
+HERE = Path(__file__).resolve().parent
+ROOT = HERE.parents[1]
+
+
+def generate(data):
+ stream = BytesIO()
+ c = Canvas(stream, pagesize=(595.28, 841.89), invariant=1)
+ c.setTitle('RefMint - synthetic PDF lookup example')
+ c.setAuthor('RefMint')
+ c.setFillColor(HexColor('#17323d'))
+ c.rect(0, 675, 596, 168, fill=1, stroke=0)
+ c.setFillColor(HexColor('#8bdbbf'))
+ c.setFont('Helvetica-Bold', 10)
+ c.drawString(42, 793, 'REFMINT / WORKFLOW LAB')
+ c.setFillColor(HexColor('#ffffff'))
+ c.setFont('Helvetica-Bold', 29)
+ c.drawString(42, 745, 'From PDF to the right record')
+ c.setFont('Helvetica', 11)
+ c.drawString(42, 712, 'Three lookup routes. One unchanged invoice number.')
+ c.setFillColor(HexColor('#a9680e'))
+ c.setFont('Helvetica-Bold', 10)
+ c.drawString(42, 642, data['warning'])
+ fields = [('01 / EXISTING NUMBER', 'Invoice number', data['invoice_number']),
+ ('02 / SIMPLE LOCAL ALIAS', 'Local alias', data['alias']),
+ ('03 / CHECKSUMMED REFERENCE', 'RefMint reference', data['reference'])]
+ for y, (heading, label, value) in zip([600, 487, 374], fields):
+ c.setFillColor(HexColor('#edf4f2'))
+ c.roundRect(32, y - 68, 531, 92, 8, fill=1, stroke=0)
+ c.setFillColor(HexColor('#086b59'))
+ c.setFont('Helvetica-Bold', 10)
+ c.drawString(46, y, heading)
+ c.setFillColor(HexColor('#17323d'))
+ c.setFont('Helvetica', 12)
+ c.drawString(46, y - 32, f'{label}: {value}')
+ c.setFillColor(HexColor('#17323d'))
+ c.setFont('Helvetica-Bold', 13)
+ c.drawString(42, 269, 'Try all three in the local form')
+ c.setFont('Helvetica', 11)
+ for y, line in [(245, 'Start the repository demo with pnpm demo, then open:'),
+ (220, data['lookup_url']),
+ (192, 'Copy an identifier above into its matching field. Try a one-symbol change.'),
+ (170, 'Compare found, invalid, ambiguous and inaccessible results.')]:
+ c.drawString(42, y, line)
+ c.linkURL(data['lookup_url'], (42, 216, 360, 233), relative=0)
+ c.setStrokeColor(HexColor('#c5d5ce'))
+ c.line(42, 133, 553, 133)
+ c.setFont('Helvetica', 10)
+ for y, line in [(112, 'Original number and regulated identifiers stay unchanged.'),
+ (96, 'A checksum is public. It does not authorize access or prove authenticity.'),
+ (80, 'Alpha API; frozen existing-ID v1 wire format. No human-entry study.')]:
+ c.drawString(42, y, line)
+ c.showPage()
+ c.save()
+ return stream.getvalue()
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('--check', action='store_true')
+ args = parser.parse_args()
+ data = json.loads((HERE / 'invoice-data.json').read_text(encoding='utf-8'))
+ pdf = HERE / 'sample-invoice.pdf'
+ content = generate(data)
+ if args.check:
+ assert pdf.read_bytes() == content, 'PDF fixture is stale; regenerate with pinned dependencies'
+ else:
+ pdf.write_bytes(content)
+ reader = PdfReader(pdf)
+ assert len(reader.pages) == 1
+ text = reader.pages[0].extract_text()
+ extracted = {}
+ for route, label, expected in [('existing', 'Invoice number', data['invoice_number']),
+ ('alias', 'Local alias', data['alias']),
+ ('refmint', 'RefMint reference', data['reference'])]:
+ lines = [line.removeprefix(label + ': ') for line in text.splitlines() if line.startswith(label + ': ')]
+ assert lines == [expected], (route, lines)
+ extracted[route] = lines[0]
+ assert data['warning'] in text
+ assert any(str(a.get_object().get('/A', {}).get('/URI', '')) == data['lookup_url']
+ for a in reader.pages[0].get('/Annots', []))
+ # Exercise lookup using actual extracted PDF text, not just its source JSON.
+ with tempfile.TemporaryDirectory() as directory:
+ path = Path(directory) / 'extracted.json'
+ path.write_text(json.dumps(extracted), encoding='utf-8')
+ subprocess.run(['node', str(HERE / 'verify-extracted.mjs'), str(path)], cwd=ROOT, check=True)
+ print('One-page PDF: three extracted identifiers, unchanged invoice number, link and lookups verified.')
+
+
+if __name__ == '__main__':
+ main()
diff --git a/examples/workflows/requirements-pdf.txt b/examples/workflows/requirements-pdf.txt
new file mode 100644
index 0000000..fd684c3
--- /dev/null
+++ b/examples/workflows/requirements-pdf.txt
@@ -0,0 +1,3 @@
+# Development-only PDF fixture generation and extraction; not npm dependencies.
+reportlab==4.4.9
+pypdf==6.10.0
diff --git a/examples/workflows/sample-invoice.pdf b/examples/workflows/sample-invoice.pdf
new file mode 100644
index 0000000..377bd6f
Binary files /dev/null and b/examples/workflows/sample-invoice.pdf differ
diff --git a/examples/workflows/style.css b/examples/workflows/style.css
new file mode 100644
index 0000000..6744957
--- /dev/null
+++ b/examples/workflows/style.css
@@ -0,0 +1 @@
+:root{font:16px/1.6 system-ui,sans-serif;color:#17323d;background:#f1f5f4}*{box-sizing:border-box}body{margin:0}main{max-width:1180px;margin:auto;padding:40px 24px}header{max-width:850px}.eyebrow{letter-spacing:.14em;font-size:.78rem;font-weight:700;color:#086b59}h1{font-size:clamp(2rem,5vw,3.4rem);line-height:1.12;letter-spacing:-.04em;margin:16px 0}h2{line-height:1.3;font-size:1.3rem}aside{margin:30px 0;background:#fff3d9;border-left:4px solid #ad7921;padding:18px 22px}.controls{padding-bottom:22px}label{display:block;font-weight:650;font-size:.9rem}select,input{font:inherit;color:inherit;background:white;border:1px solid #a7b9b5;border-radius:7px;padding:10px;width:100%}select{max-width:360px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}article{background:white;padding:22px;border:1px solid #d4dfdc;border-radius:12px}article>p{min-height:52px}input{font:14px/1.6 ui-monospace,monospace}article p.length{min-height:0;color:#51686e;font-size:.82rem}output{display:block;padding:12px;background:#edf4f2;min-height:110px;overflow-wrap:anywhere;border-radius:7px}output[data-state=invalid]{background:#fff3d9}output[data-state=found]{border-left:3px solid #12846a}button{font:inherit;cursor:pointer;border:1px solid #b4c7c0;background:white;color:#17323d;border-radius:7px;padding:9px 14px}.presets{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.primary{background:#0c6857;color:white;border:0;margin:18px 0 24px;padding:12px 22px}a{color:#086b59}footer{margin-top:36px;padding-top:20px;border-top:1px solid #c5d5ce;font-size:.85rem;color:#536b71}:focus-visible{outline:3px solid #a87522;outline-offset:3px}@media(max-width:820px){.cards{grid-template-columns:1fr}main{padding:24px 16px}article>p{min-height:0}}
diff --git a/examples/workflows/verify-extracted.mjs b/examples/workflows/verify-extracted.mjs
new file mode 100644
index 0000000..8b52d8a
--- /dev/null
+++ b/examples/workflows/verify-extracted.mjs
@@ -0,0 +1,12 @@
+import assert from 'node:assert/strict';
+import { readFile } from 'node:fs/promises';
+import { lookup, changedSymbol } from './model.mjs';
+
+const inputs = JSON.parse(await readFile(process.argv[2], 'utf8'));
+for (const route of ['existing', 'alias', 'refmint']) {
+ const result = lookup('invoice', route, inputs[route]);
+ assert.equal(result.status, 'found');
+ assert.equal(result.record.id, '42');
+ assert.equal(result.record.label, 'INV-2026-000042');
+}
+assert.deepEqual(lookup('invoice', 'refmint', changedSymbol(inputs.refmint.toLowerCase())), { status: 'invalid', reason: 'checksum', queries: 0 });
diff --git a/package.json b/package.json
index 55c05b7..35357a7 100644
--- a/package.json
+++ b/package.json
@@ -59,6 +59,8 @@
"demo": "node scripts/serve.mjs",
"test:browser": "playwright test",
"test:comparison": "node scripts/compare.mjs --check",
+ "workflows": "node scripts/workflows.mjs",
+ "test:workflows": "node scripts/workflows.mjs --check",
"prepack": "pnpm build"
},
"packageManager": "pnpm@11.25.0",
diff --git a/scripts/demo-server.mjs b/scripts/demo-server.mjs
index cbb76d6..0141cda 100644
--- a/scripts/demo-server.mjs
+++ b/scripts/demo-server.mjs
@@ -12,6 +12,9 @@ for (const name of ['index.html', 'app.mjs', 'style.css', 'bech32-adapter.mjs',
files.set('/comparison/' + (name === 'index.html' ? '' : name), [`../examples/comparison/${name}`, `${type}; charset=utf-8`]);
}
files.set('/docs/comparison.json', ['../docs/comparison.json', 'application/json; charset=utf-8']);
+for (const [name, type] of [['index.html', 'text/html; charset=utf-8'], ['style.css', 'text/css; charset=utf-8'], ['app.mjs', 'text/javascript; charset=utf-8'], ['model.mjs', 'text/javascript; charset=utf-8'], ['sample-invoice.pdf', 'application/pdf']]) {
+ files.set('/workflows/' + (name === 'index.html' ? '' : name), [`../examples/workflows/${name}`, type]);
+}
export function createDemoServer() {
return createServer(async (req, res) => {
diff --git a/scripts/workflows.mjs b/scripts/workflows.mjs
new file mode 100644
index 0000000..d8ed557
--- /dev/null
+++ b/scripts/workflows.mjs
@@ -0,0 +1,45 @@
+import assert from 'node:assert/strict';
+import { createHash } from 'node:crypto';
+import { readFile, writeFile } from 'node:fs/promises';
+import { fileURLToPath } from 'node:url';
+import { domains, routes, records, identifier, lookup, scenarios } from '../examples/workflows/model.mjs';
+
+const root = new URL('../', import.meta.url);
+const rows = [];
+for (const domain of domains) for (const route of routes) for (const scenario of scenarios(domain, route)) {
+ const result = lookup(domain, route, scenario.input);
+ assert.equal(result.status, scenario.expected, `${domain}/${route}/${scenario.name}`);
+ rows.push({ domain, route, case: scenario.name, input: scenario.input, ...result,
+ different_record: result.status === 'found' && scenario.intended !== undefined && result.record.id !== scenario.intended });
+}
+const lengths = domains.flatMap(domain => routes.map(route => {
+ const record = records.find(r => r.domain === domain);
+ return { domain, route, canonical: identifier(record, route).length, printed: identifier(record, route, true).length };
+}));
+const sources = ['examples/workflows/model.mjs', 'scripts/workflows.mjs', 'dist/codec.js', 'dist/presentation.js', 'dist/bech32m.js'];
+const hashes = {};
+for (const path of sources) hashes[path] = createHash('sha256').update((await readFile(new URL(path, root), 'utf8')).replaceAll('\r\n', '\n')).digest('hex');
+const evidence = { schema: 1, recorded: '2026-10-28', sample: 'synthetic local fixtures, not production support cases',
+ measured: 'logical lookup calls and identifier lengths, not latency or human error rates', sources: hashes, lengths, rows };
+const invoice = records.find(r => r.domain === 'invoice');
+const pdfData = { invoice_number: invoice.existing, database_id: invoice.id, alias: invoice.alias,
+ reference: identifier(invoice, 'refmint', true), lookup_url: 'http://127.0.0.1:4173/workflows/',
+ warning: 'DEMONSTRATION ONLY - NOT A TAX INVOICE' };
+const outputs = new Map([
+ ['docs/workflows.json', JSON.stringify(evidence, null, 2) + '\n'],
+ ['examples/workflows/invoice-data.json', JSON.stringify(pdfData, null, 2) + '\n']
+]);
+const table = ['# Local lookup results', '', 'Synthetic fixtures, recorded 28 October 2026. No production support cases or human timing data.', '',
+ '| Domain | Route | Canonical characters | Printed characters |', '| --- | --- | ---: | ---: |',
+ ...lengths.map(r => `| ${r.domain} | ${r.route} | ${r.canonical} | ${r.printed} |`), '',
+ '| Domain | Route | Case | Result | Logical lookups | Different record from intended? |', '| --- | --- | --- | --- | ---: | --- |',
+ ...rows.map(r => `| ${r.domain} | ${r.route} | ${r.case} | ${r.status}${r.reason ? ` (${r.reason})` : ''} | ${r.queries} | ${r.different_record ? 'yes' : 'no'} |`), '',
+ 'A valid code for another record still passes its checksum. Scope restrictions apply equally to all routes.',
+ 'The one-symbol cases were selected to expose a failure mode, not sampled to estimate its frequency.', ''].join('\n');
+outputs.set('docs/workflow-results.md', table);
+for (const [path, content] of outputs) {
+ const url = new URL(path, root);
+ if (process.argv.includes('--check')) assert.equal((await readFile(url, 'utf8')).replaceAll('\r\n', '\n'), content, `stale ${path}`);
+ else await writeFile(url, content);
+}
+console.log(`${rows.length} fixture cases checked; ${fileURLToPath(new URL('docs/workflows.json', root))}`);
diff --git a/tests/browser/workflows.spec.mjs b/tests/browser/workflows.spec.mjs
new file mode 100644
index 0000000..46e8035
--- /dev/null
+++ b/tests/browser/workflows.spec.mjs
@@ -0,0 +1,36 @@
+import { test, expect } from '@playwright/test';
+
+test('three routes show successes, typo trade-offs and equal authorization outcomes', async ({ page, request }) => {
+ const errors = [];
+ page.on('pageerror', error => errors.push(error.message));
+ await page.goto('/workflows/');
+ for (const domain of ['invoice', 'fleet']) {
+ await page.getByLabel('Workflow', { exact: true }).selectOption(domain);
+ for (const route of ['existing', 'alias', 'refmint']) await expect(page.locator(`#${route}-result`)).toHaveAttribute('data-state', 'found');
+ await page.getByRole('button', { name: 'One-symbol change', exact: true }).click();
+ await expect(page.locator('#refmint-result')).toContainText('Logical lookups: 0');
+ await expect(page.locator('#alias-result')).toHaveAttribute('data-state', 'found');
+ await page.getByRole('button', { name: 'Outside allowed scope', exact: true }).click();
+ for (const route of ['existing', 'alias', 'refmint']) await expect(page.locator(`#${route}-result`)).toContainText('No accessible record found');
+ await page.getByRole('button', { name: 'Another valid code', exact: true }).click();
+ await expect(page.locator('#refmint-result')).toHaveAttribute('data-state', 'found');
+ }
+ const pdf = await request.get('/workflows/sample-invoice.pdf');
+ expect(pdf.status()).toBe(200);
+ expect(pdf.headers()['content-type']).toBe('application/pdf');
+ expect((await pdf.body()).subarray(0, 5).toString()).toBe('%PDF-');
+ expect(errors).toEqual([]);
+});
+
+test('manual pasted identifiers work on a phone viewport', async ({ page }) => {
+ await page.setViewportSize({ width: 375, height: 812 });
+ await page.goto('/workflows/');
+ const reference = await page.locator('#refmint').inputValue();
+ await page.getByLabel('RefMint reference', { exact: true }).fill(` ${reference.toUpperCase()} `);
+ await page.getByRole('button', { name: 'Look up all three', exact: true }).click();
+ await expect(page.locator('#refmint-result')).toContainText('INV-2026-000042');
+ await page.getByLabel('Local alias', { exact: true }).fill('');
+ await page.getByRole('button', { name: 'Look up all three', exact: true }).click();
+ await expect(page.locator('#alias-result')).toHaveAttribute('data-state', 'not_found');
+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);
+});
diff --git a/tests/workflows.test.mjs b/tests/workflows.test.mjs
new file mode 100644
index 0000000..6c2b9a3
--- /dev/null
+++ b/tests/workflows.test.mjs
@@ -0,0 +1,28 @@
+import assert from 'node:assert/strict';
+import test from 'node:test';
+import { domains, routes, records, identifier, lookup, scenarios } from '../examples/workflows/model.mjs';
+
+test('lookup alternatives preserve identifiers and scope across every case', () => {
+ const before = JSON.stringify(records);
+ for (const domain of domains) for (const route of routes) {
+ for (const item of scenarios(domain, route)) assert.equal(lookup(domain, route, item.input).status, item.expected);
+ const denied = records.find(r => r.domain === domain && r.owner === 'other-team');
+ assert.deepEqual(lookup(domain, route, identifier(denied, route)), { status: 'not_found', queries: 1 });
+ assert.equal(lookup(domain, route, identifier(denied, route), 'other-team').status, 'found');
+ }
+ assert.equal(JSON.stringify(records), before);
+ assert.equal(records.find(r => r.domain === 'invoice').existing, 'INV-2026-000042');
+});
+
+test('checksum cannot authenticate or detect a different complete valid code', () => {
+ for (const domain of domains) {
+ const [, neighbor] = records.filter(r => r.domain === domain);
+ assert.equal(lookup(domain, 'refmint', identifier(neighbor, 'refmint')).record.id, neighbor.id);
+ }
+});
+
+test('existing hostname search can be more useful than an exact reference', () => {
+ assert.deepEqual(lookup('fleet', 'existing', 'press'), { status: 'ambiguous', queries: 1, matches: 2 });
+ assert.equal(lookup('fleet', 'refmint', 'press').status, 'invalid');
+ assert.ok(identifier(records[0], 'refmint', true).length > identifier(records[0], 'alias').length);
+});