Repository navigation
docs backend forum bulletins
Automatic publication remains off; no production bulletin is claimed by this document.
- Methodology:
forum-official-mean-v1. - Input owner: Official (
official_revisions,official_station_prices,official_import_runs,official_current_revisions). Forum never reads a single price row to infer representativeness. - Product rule: B-BR-FOR-15 and BUC-FOR-08.
- Source rule: FORUM_ABASTEVO_SOURCES.md — only accepted internal Official imports. Community and charging observations are excluded from the first statistical template.
The first bulletin compares two accepted complete weekly survey revisions:
- the current published revision of the latest survey window in
official_current_revisions; - the current published revision of the latest earlier window whose
survey_endis strictly before the latest window'ssurvey_start.
Both revisions must have status = 'published' and a current pointer. Staging,
failed, needs-review, superseded and orphan revisions are never inputs. If fewer
than two eligible windows exist, there is no bulletin. A same-window corrected
import replaces the window's current pointer and is the revision used.
For one UF, one Official fuel wire value and one unit:
- take the latest observation per station in the revision, ordered by
collected_on DESC, id(the existing ranking rule); - a station contributes at most one observation, so duplicate source rows are counted in coverage but not summed twice;
- geography is the station's canonical
directory_stations.state; stations with no canonical state are excluded from UF bulletins and never guessed; - the same fuel and unit apply to both revisions; mixed units are refused.
The result is a cross-sectional comparison of two samples. It does not measure same-station price change, national fleet behavior, ANP's published mean, statistical confidence or future prices.
A UF/fuel/unit pair is eligible only when:
- both revisions are present;
- both samples have at least 30 distinct sampled stations;
- both sums and observation counts are positive;
- the query fuel/unit pair is in the frozen Official ranking vocabulary.
The 30-station floor is a conservative product threshold, not a statistical significance claim. Ineligible or absent regions produce no bulletin and a typed skip reason for the future operational record.
For each revision and UF:
-
sum_milli_brl: exact integer sum over the deduplicated sample; -
observation_count: count of deduplicated observations; -
sampled_stations: distinct stations in the sample (equal to the count); -
source_observations: raw Official rows for the fuel/unit before dedup; -
source_stations: distinct stations with any Official price in the revision and UF (coverage denominator); - mean: exact rational
sum / count, reduced with positive denominator. FOR-25 stores numerator/denominator; display rounding is frozen in FOR-26; - coverage flags: sample is sampled (
sampled = true) and never claims national completeness.
Sums are read from PostgreSQL numeric text and must fit a positive int64
milli-BRL value. Overflow is a typed refusal, never a wrapped value.
- Template version:
forum-bulletin-v1; original plain pt-BR text, no LLM, network, HTML or Markdown. - Mean and absolute difference display 0.001 BRL per unit, rounded from the exact unrounded rational half away from zero. Percent display is 0.1%, also half away from zero.
- Decimal separator is comma; there is no thousands separator. Positive deltas
carry
+, negative carry-, and zero is unsigned (0,000,0,0%). Dates remain ISOYYYY-MM-DD; units display asL,m³orkg. - The title/excerpt/body always state the sample counts, both periods, coverage counts, the two revision IDs/checksums/URLs, methodology version and template version, and the explicit non-claims (not ANP's published mean, not same- station change, not national fleet behavior).
- Bulletin key = template version + current revision UUID + previous revision UUID + UF + fuel + unit. The same key is a no-op and never rewrites content.
- A correction is a newer accepted revision pair for the same two survey
windows; it produces a different key. FOR-27 persists the
supersedes_post_idlink after review. Checksums are provenance, not an alternative revision identity: Official always opens a new revision UUID for changed bytes. - Provenance URLs must be HTTPS without userinfo; URLs, checksums and parser versions reject control characters before rendering.
- The template only reads the frozen aggregate; it never changes stored Official prices or claims a different source.
Every computed set carries, for both revisions: revision UUID, survey
start/end, published_at, source URL, source checksum and parser version;
plus methodology version, fuel, unit and query version. This manifest is the
reproducible provenance for FOR-26 templates and FOR-27 review.
- No LLM, network or invented sentence in this task.
- No community or charging observation enters the first template.
- No national aggregation or unobserved-region extrapolation.
- No publication, source activation or Android surface is implied by the aggregate port.
- Trigger: a successful accepted Official import enqueues one idempotent
forum-bulletin-generatejob; a daily bounded reconciliation schedule runs the same generator to recover missed enqueues. Raw downloads never trigger it. - The generator reads every frozen Official fuel/unit pair, applies the FOR-25
eligibility rules and creates only
PENDING_REVIEWposts. It never calls publish, never marks a source item live and never auto-publicates. - One unique
bulletin_keyper revision pair makes concurrent/restarted runs converge.bulletin_group_keygroups the same two survey windows plus UF, fuel and unit; a later revision pair links the newest prior group post throughsupersedes_post_id. - Admin review reuses the existing Forum publish/reject path. Publishing a
correction verifies the previous post is the same bulletin group and hides it
(
visibility = HIDDEN) in the same transaction while bumping the feed revision. Deterministic bulletin text is immutable in the admin editor; a source correction must generate a new draft. Rejecting the correction leaves the prior bulletin visible. - Public detail exposes the structured provenance/methodology object and the supersedes UUID; Android renders the methodology, periods, samples, coverage and correction notice on the existing detail screen.
- Forum
fuel_productstays null for bulletins because the Official ranking fuel vocabulary is not the topic form vocabulary. The exact fuel and unit are in the structured provenance and body; no wrong cross-vocabulary mapping is stored. The feed category remainsABASTEVO_DATA. - Rollback: disable the after-publish enqueue and daily schedule, then remove the handler; preserve generated drafts, published bulletins and correction links. Official/Directory/Charging trust is untouched.
- Home
- Roadmap
- docs-README
- docs-android-build
- docs-android-design-system
- docs-android-forum
- docs-android-games
- docs-android-map-engine
- docs-android-navigation
- docs-android-ocr-image
- docs-android-ocr-live-framing
- docs-android-premium-area
- docs-android-premium-integration
- docs-android-release
- docs-android-ui-containers
- docs-architecture-android-stack
- docs-architecture-android
- docs-architecture-backend
- docs-architecture-data-sources
- docs-architecture-overview
- docs-architecture-sources-ev-research
- docs-architecture-sources-national-limits
- docs-architecture-sources-national-stations
- docs-architecture-sources-register
- docs-assets-app-tutorial-CAPTURE_CONTRACT
- docs-assets-app-tutorial-FABLE_LANDING_POLISH_PROMPT
- docs-assets-app-tutorial-README
- docs-assets-attribution
- docs-assets-brand-README
- docs-assets-flags-ATTRIBUTION
- docs-assets-fuel-icons-README
- docs-assets-games-fuel-v1-README
- docs-assets-home-icons-README
- docs-assets-landing-fleet-android-20261012-BRIEF
- docs-assets-landing-hero-20261011-BRIEF
- docs-assets-landing-illustrated-20261012-BRIEF
- docs-assets-landing-illustrated-20261012-README
- docs-assets-landing-minimal-20261012-BRIEF
- docs-assets-landing-open-data-20261026-BRIEF
- docs-assets-landing-redesign-20261011-PREPARATION_EVIDENCE
- docs-assets-landing-redesign-20261011-README
- docs-assets-landing-redesign-20261011-REFERENCE_BRIEF
- docs-assets-landing-sync-20261012-BRIEF
- docs-assets-map-icons-README
- docs-backend-anp-ingestion
- docs-backend-api
- docs-backend-community-pricing
- docs-backend-data-model
- docs-backend-domain-model
- docs-backend-driver-private-data
- docs-backend-forum-architecture
- docs-backend-forum-bulletins
- docs-backend-forum-sources
- docs-backend-payments-provider-admission
- docs-backend-payments-provider-register
- docs-backend-photos-capture
- docs-backend-photos-subset-submission
- docs-backend-premium-api
- docs-backend-premium-cloud-protocol
- docs-backend-testing
- docs-backend-toolchain
- docs-brand-app-icons
- docs-brand-identity
- docs-decisions-001-kotlin-compose-stack
- docs-decisions-002-price-import-immutability
- docs-decisions-003-nominatim-reverse-geocode
- docs-decisions-005-modular-monolith-and-postgresql
- docs-decisions-006-official-catalog-and-exact-contracts
- docs-decisions-007-anonymous-proof-of-possession
- docs-decisions-008-privacy-and-retention
- docs-decisions-009-community-consensus-and-projections
- docs-decisions-010-private-object-evidence
- docs-decisions-012-licensing-and-hosted-business
- docs-decisions-015-kotlin-multiplatform-shared-domain
- docs-decisions-016-android-commercial-community-ios-deferred
- docs-decisions-017-station-profile-and-verified-representation
- docs-decisions-021-community-first-contribution
- docs-decisions-022-comaps-derived-native-map-engine
- docs-decisions-023-admin-suite-granted-tiers-contributors
- docs-decisions-025-private-abastevo-empresas-organization-boundary
- docs-decisions-026-multilingual-public-site
- docs-decisions-README
- docs-enterprise-README
- docs-enterprise-architecture
- docs-enterprise-backlog-INDEX
- docs-enterprise-backlog-ep00-governance
- docs-enterprise-backlog-ep01-platform
- docs-enterprise-backlog-ep02-organizations
- docs-enterprise-backlog-ep03-identity-access
- docs-enterprise-backlog-ep04-sync
- docs-enterprise-backlog-ep05-fleet-meters
- docs-enterprise-backlog-ep06-trips
- docs-enterprise-backlog-ep07-gps-navigation
- docs-enterprise-backlog-ep08-fuelings
- docs-enterprise-backlog-ep09-documents
- docs-enterprise-backlog-ep10-expenses-finance
- docs-enterprise-backlog-ep11-maintenance
- docs-enterprise-backlog-ep12-fuel-stock
- docs-enterprise-backlog-ep13-intelligence
- docs-enterprise-backlog-ep14-station-claims
- docs-enterprise-backlog-ep15-station-commerce
- docs-enterprise-backlog-ep16-subscriptions
- docs-enterprise-backlog-ep17-data
- docs-enterprise-backlog-ep18-imports-notifications-integrations
- docs-enterprise-backlog-ep19-back-office
- docs-enterprise-backlog-ep20-release
- docs-enterprise-business-rules
- docs-enterprise-contract
- docs-enterprise-conventions
- docs-enterprise-data-offering
- docs-enterprise-decisions
- docs-enterprise-domain-model
- docs-enterprise-glossary
- docs-enterprise-journeys
- docs-enterprise-modules-back-office
- docs-enterprise-modules-data
- docs-enterprise-modules-documents
- docs-enterprise-modules-expenses-finance
- docs-enterprise-modules-fleet
- docs-enterprise-modules-fuel-stock
- docs-enterprise-modules-fuelings
- docs-enterprise-modules-gps-navigation
- docs-enterprise-modules-identity
- docs-enterprise-modules-imports-notifications-integrations
- docs-enterprise-modules-intelligence
- docs-enterprise-modules-maintenance
- docs-enterprise-modules-organizations
- docs-enterprise-modules-station-claims
- docs-enterprise-modules-station-commerce
- docs-enterprise-modules-subscriptions
- docs-enterprise-modules-trips
- docs-enterprise-offline-sync
- docs-enterprise-permissions
- docs-enterprise-portal-routes
- docs-enterprise-privacy-security
- docs-enterprise-product-vision
- docs-enterprise-source-admission
- docs-enterprise-state-model
- docs-enterprise-testing
- docs-enterprise-ux-app
- docs-enterprise-ux-web
- docs-operations-README
- docs-operations-backup
- docs-operations-deploy-agent
- docs-operations-dou-editions
- docs-operations-edge-cache
- docs-operations-enterprise-activation
- docs-operations-map-static-overlay
- docs-operations-moderation-feedback
- docs-operations-moderation-profiles
- docs-operations-monitoring
- docs-operations-operator-access
- docs-operations-payments
- docs-operations-premium-billing
- docs-operations-recovery
- docs-operations-registry-daily-sync
- docs-operations-registry-runs
- docs-product-README
- docs-product-admin-tiers
- docs-product-community-community-first
- docs-product-community-experience
- docs-product-community-metrics
- docs-product-community-moderation
- docs-product-community-safety
- docs-product-community-terms-pt-br
- docs-product-driver-suite-README
- docs-product-driver-suite-android-state
- docs-product-driver-suite-cloud-sync
- docs-product-driver-suite-cost-profiles-and-maintenance
- docs-product-driver-suite-driver-model-and-earnings
- docs-product-driver-suite-foundation-decisions
- docs-product-driver-suite-gps-lifecycle
- docs-product-driver-suite-mobile-hub
- docs-product-driver-suite-odometer-review
- docs-product-driver-suite-outbox-wire
- docs-product-driver-suite-quick-refuel
- docs-product-driver-suite-reports
- docs-product-driver-suite-shifts-and-distance
- docs-product-driver-suite-signed-commands
- docs-product-ev-README
- docs-product-ev-charging-stop-planner
- docs-product-ev-energy-model
- docs-product-ev-financial-method
- docs-product-ev-journey-ui
- docs-product-ev-preparation
- docs-product-ev-typed-data
- docs-product-exploration
- docs-product-forum-contract
- docs-product-forum-policies
- docs-product-glossary
- docs-product-landing-content
- docs-product-landing-guides
- docs-product-landing-organic-growth-i18n-plan
- docs-product-licensing
- docs-product-map-discovery
- docs-product-map-favorites-and-trips
- docs-product-map-reports-routing-guidance
- docs-product-notification-content
- docs-product-official-prices
- docs-product-open-source-business
- docs-product-overview
- docs-product-payments-README
- docs-product-payments-offer-policy
- docs-product-premium-README
- docs-product-premium-financial-method
- docs-product-premium-source-policy
- docs-product-stations-catalog
- docs-product-stations-fuel-feedback
- docs-product-stations-fuel-quality
- docs-product-stations-identity-and-ev-catalog
- docs-product-stations-profile-contract
- docs-product-stations-profile-representation
- docs-product-stations-registry-sources
- docs-product-vehicle-registration
- docs-product-vehicles-and-occurrences
- docs-security-android-terms-acceptance
- docs-security-free-account-access
- docs-security-identity-profile
- docs-security-media-location-policy
- docs-security-privacy-notice
- docs-security-privacy-policy
- docs-security-retention
- docs-security-risks
- docs-security-security-privacy
- docs-store-README
- docs-store-play-readiness
- docs-store-play-store-listing
- docs-store-ugc-safety
Source: AlexandreZanata/Abastevo @ e4a67580fc368a59bc1c0f1e0466fc011313f330