matching-discovery — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited matching-discovery (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Geo and availability logic lives server-side always. Client-side filtering is display only, never the source of truth.
Requesters post requests. They do not browse operator profiles or cold-search trucks. The marketplace comes to them.
Flow:
There is no operator directory browse for requesters. No "search for trucks" UI. Operators come to the request.
Operators browse an active request feed filtered to their service radius. They see requests, choose which to respond to, and submit responses.
Flow:
listings.service_radius_m)ST_DWithin(request.location_point, listing.base_location, listing.service_radius_m)Never calculate distance in application code. No Haversine formula in TypeScript. No raw lat/long subtraction. All distance queries use the database.
-- Correct: Get all active requests within an operator's service radius
SELECT r.*
FROM requests r
JOIN listings l ON l.operator_id = $operator_id
WHERE r.status = 'active'
AND r.expires_at > now()
AND ST_DWithin(
r.location_point::geography,
l.base_location::geography,
l.service_radius_m
)
ORDER BY r.created_at DESC;
-- Correct: Distance calculation for display
SELECT
r.*,
ROUND(ST_Distance(
r.location_point::geography,
l.base_location::geography
) / 1000, 1) AS distance_km
FROM requests r
JOIN listings l ON l.operator_id = $operator_id
WHERE r.status = 'active';🔴 GEO LOGIC VIOLATION — Application-level distance calculation
Found: Distance being calculated in TypeScript/JavaScript
Required: Move this to a SQL query using ST_DWithin or ST_Distance
Application code must only receive pre-filtered results from the databaseActive request feed for operators, ordered by:
created_at DESC as the base sort (newest first)headcount_max >= 200 OR time window >= 4 hours (proxy for higher operator revenue)SELECT
r.*,
ROUND(ST_Distance(
r.location_point::geography,
l.base_location::geography
) / 1000, 1) AS distance_km,
-- Boost score: higher headcount or longer window = higher relevance
(
CASE WHEN r.headcount_max >= 200 THEN 2 ELSE 0 END +
CASE WHEN EXTRACT(EPOCH FROM (r.end_time - r.start_time)) / 3600 >= 4 THEN 1 ELSE 0 END
) AS boost_score
FROM requests r
JOIN listings l ON l.operator_id = $operator_id
WHERE r.status = 'active'
AND r.expires_at > now()
AND ST_DWithin(
r.location_point::geography,
l.base_location::geography,
l.service_radius_m
)
ORDER BY boost_score DESC, r.created_at DESC;Unsubscribed operators (or operators with past_due, canceled, incomplete status) can see that requests exist, but contact info and exact address are hidden. This is a deliberate conversion mechanic.
// Transform request data based on subscription status
function sanitizeRequestForOperator(
request: Request,
subscription: Subscription | null
): PublicRequest | FullRequest {
const hasAccess = subscription && isOperatorAccessGranted(subscription.status)
if (hasAccess) {
return request // full data
}
// Teaser: strip sensitive fields, blur address
return {
...request,
location_address: blurAddress(request.location_address), // "Cape Coral, FL" not "123 Main St"
requester_id: null, // hide identity
notes: null, // hide notes
_teaser: true, // flag for UI to show upgrade prompt
}
}
function blurAddress(address: string): string {
// Return only city/state — strip street number and street name
const parts = address.split(',')
return parts.slice(-2).join(',').trim() // e.g., "Cape Coral, FL 33990"
}status = 'expired' via scheduled job (see marketplace-architecture skill)-- Operator feed: exclude expired
WHERE r.status = 'active' AND r.expires_at > now()
-- Requester dashboard: show all statuses
WHERE r.requester_id = $requester_id
ORDER BY r.created_at DESCNotifications are push-based via Supabase Realtime, not polling.
When a new request is inserted and its location falls within an operator's service radius:
INSERT to requests tablenotifications table for each qualifying operatornotifications insert to the operator's active session-- Notification trigger (runs on requests INSERT)
CREATE OR REPLACE FUNCTION notify_operators_of_new_request()
RETURNS trigger AS $$
BEGIN
INSERT INTO notifications (user_id, type, reference_id, message)
SELECT
l.operator_id,
'new_request_in_radius',
NEW.id,
'A new request is available in your service area'
FROM listings l
JOIN subscriptions s ON s.operator_id = l.operator_id
WHERE s.status IN ('active', 'trialing')
AND l.is_active = true
AND ST_DWithin(
NEW.location_point::geography,
l.base_location::geography,
l.service_radius_m
);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;When a new match is inserted (operator responds):
INSERT to matches tablenotifications for the requester// In the operator's dashboard component
const supabase = createClientComponentClient()
useEffect(() => {
const channel = supabase
.channel('operator-notifications')
.on(
'postgres_changes',
{
event: 'INSERT',
schema: 'public',
table: 'notifications',
filter: `user_id=eq.${operatorId}`,
},
(payload) => {
// Add notification to UI state
addNotification(payload.new)
}
)
.subscribe()
return () => { supabase.removeChannel(channel) }
}, [operatorId])expires_at > now() in the WHERE clause? → If not, expired requests leak~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.