fix(ci): keep s3s footprint ratchet tight

Route bucket list-through test-only S3 wire types through the app storage facade again so the PR does not add a direct s3s-importing file.

Retighten the s3_error! footprint baseline to the current lower count.

Co-Authored-By: heihutu <heihutu@gmail.com>

Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
houseme
2026-09-06 01:47:40 +08:00
parent e907ae4be4
commit b9e7fcd755
3 changed files with 11 additions and 4 deletions
+4 -3
View File
@@ -443,7 +443,9 @@ mod tests {
use super::*;
use crate::app::bucket_usecase::DefaultBucketUsecase;
use crate::app::gating_test_env::{run_large_stack_test, shared_gating_ecstore};
use crate::app::storage_api::bucket_usecase::s3::{ListObjectsV2Input, ListObjectsV2Output, S3Request, S3Response};
use crate::app::storage_api::bucket_usecase::s3::{
ListObjectsInput, ListObjectsV2Input, ListObjectsV2Output, S3Request, S3Response, XmlSerialize, XmlSerializer,
};
use crate::app::storage_api::test::StoragePutObjReader;
use crate::app::storage_api::test::contract::bucket::{BucketOperations as _, MakeBucketOptions};
use crate::app::storage_api::test::contract::object::ObjectIO as _;
@@ -451,7 +453,6 @@ mod tests {
FilterConfig, MAX_LIST_NO_PROGRESS_PAGES, OnDemandMigrationConfig, PathStyle, PolicyConfig, Provider, SourceConfig,
SourceCredentials, TlsConfig,
};
use s3s::dto::ListObjectsInput;
use std::time::Duration;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
@@ -864,7 +865,7 @@ mod tests {
assert_eq!(output.next_marker.as_deref(), (index == 0).then_some(expected_key));
let mut xml = Vec::new();
s3s::xml::Serialize::serialize(&output, &mut s3s::xml::Serializer::new(&mut xml))
XmlSerialize::serialize(&output, &mut XmlSerializer::new(&mut xml))
.expect("serialize the real v1 response");
assert!(!xml.contains(&0), "XML 1.0 forbids NUL in NextMarker");
let mut reader = quick_xml::Reader::from_reader(xml.as_slice());
+4
View File
@@ -27,12 +27,16 @@ pub(crate) fn EndpointServerPools(
/// S3 wire types for app-layer modules, funneled here so new files stay off
/// the direct s3s surface (s3s footprint ratchet, `scripts/check_s3s_footprint.sh`).
pub(crate) mod s3 {
#[cfg(test)]
pub(crate) use s3s::dto::ListObjectsInput;
#[cfg(test)]
pub(crate) use s3s::dto::{
BucketVersioningStatus, DeleteMarkerReplication, DeleteMarkerReplicationStatus, Destination, ListObjectsV2Input,
ListObjectsV2Output, ReplicationConfiguration, ReplicationRule, ReplicationRuleFilter, ReplicationRuleStatus,
ServerSideEncryptionByDefault, ServerSideEncryptionConfiguration, ServerSideEncryptionRule, Tag, VersioningConfiguration,
};
#[cfg(test)]
pub(crate) use s3s::xml::{Serialize as XmlSerialize, Serializer as XmlSerializer};
pub(crate) use s3s::{S3Error, S3ErrorCode, S3Result};
#[cfg(test)]
pub(crate) use s3s::{S3Request, S3Response};
+3 -1
View File
@@ -50,8 +50,10 @@ cd "$(dirname "$0")/.."
# s3_error! stays flat at 1616.
# 1616 → 1613 on 2026-09-02: dependency refresh verified the current tree has
# already shed three s3_error! invocation lines; retighten the line counter.
# 1613 → 1599 on 2026-09-06: scanner publication coverage follow-up inherits
# current s3_error! shrinkage; retighten the line counter.
S3S_IMPORT_FILES_BASELINE=213
S3_ERROR_LINES_BASELINE=1613
S3_ERROR_LINES_BASELINE=1599
# ecstore-scoped ratchet (rustfs/backlog#1842): the storage engine must not
# know S3 wire/DTO types (ARCHITECTURE.md invariant 4). The S3-*consuming*
# client was extracted to crates/s3-client, where s3s usage is legitimate;